@@ -70,7 +70,7 @@ impl<'x> AuthenticationResults<'x> {
7070 }
7171
7272 if dkim. is_atps {
73- write ! ( self . auth_results, " header.from={}" , header_from ) . ok ( ) ;
73+ write ! ( self . auth_results, " header.from={header_from}" ) . ok ( ) ;
7474 }
7575 }
7676
@@ -84,10 +84,10 @@ impl<'x> AuthenticationResults<'x> {
8484 spf. result . as_spf_result (
8585 & mut self . auth_results ,
8686 self . hostname ,
87- & format ! ( "postmaster@{}" , ehlo_domain ) ,
87+ & format ! ( "postmaster@{ehlo_domain}" ) ,
8888 ip_addr,
8989 ) ;
90- write ! ( self . auth_results, " smtp.helo={}" , ehlo_domain ) . ok ( ) ;
90+ write ! ( self . auth_results, " smtp.helo={ehlo_domain}" ) . ok ( ) ;
9191 self
9292 }
9393
@@ -101,7 +101,7 @@ impl<'x> AuthenticationResults<'x> {
101101 let ( mail_from, addr) = if !from. is_empty ( ) {
102102 ( Cow :: from ( from) , from)
103103 } else {
104- ( format ! ( "postmaster@{}" , ehlo_domain ) . into ( ) , "<>" )
104+ ( format ! ( "postmaster@{ehlo_domain}" ) . into ( ) , "<>" )
105105 } ;
106106 self . auth_results . push_str ( ";\r \n \t spf=" ) ;
107107 spf. result . as_spf_result (
@@ -110,14 +110,14 @@ impl<'x> AuthenticationResults<'x> {
110110 mail_from. as_ref ( ) ,
111111 ip_addr,
112112 ) ;
113- write ! ( self . auth_results, " smtp.mailfrom={}" , addr ) . ok ( ) ;
113+ write ! ( self . auth_results, " smtp.mailfrom={addr}" ) . ok ( ) ;
114114 self
115115 }
116116
117117 pub fn with_arc_result ( mut self , arc : & ArcOutput , remote_ip : IpAddr ) -> Self {
118118 self . auth_results . push_str ( ";\r \n \t arc=" ) ;
119119 arc. result . as_auth_result ( & mut self . auth_results ) ;
120- write ! ( self . auth_results, " smtp.remote-ip={}" , remote_ip ) . ok ( ) ;
120+ write ! ( self . auth_results, " smtp.remote-ip={remote_ip}" ) . ok ( ) ;
121121 self
122122 }
123123
@@ -144,7 +144,7 @@ impl<'x> AuthenticationResults<'x> {
144144 pub fn with_iprev_result ( mut self , iprev : & IprevOutput , remote_ip : IpAddr ) -> Self {
145145 self . auth_results . push_str ( ";\r \n \t iprev=" ) ;
146146 iprev. result . as_auth_result ( & mut self . auth_results ) ;
147- write ! ( self . auth_results, " policy.iprev={}" , remote_ip ) . ok ( ) ;
147+ write ! ( self . auth_results, " policy.iprev={remote_ip}" ) . ok ( ) ;
148148 self
149149 }
150150}
@@ -189,16 +189,15 @@ impl ReceivedSpf {
189189 let mail_from = if !mail_from. is_empty ( ) {
190190 Cow :: from ( mail_from)
191191 } else {
192- format ! ( "postmaster@{}" , helo ) . into ( )
192+ format ! ( "postmaster@{helo}" ) . into ( )
193193 } ;
194194
195195 spf. result
196196 . as_spf_result ( & mut received_spf, hostname, mail_from. as_ref ( ) , ip_addr) ;
197197
198198 write ! (
199199 received_spf,
200- "\r \n \t receiver={}; client-ip={}; envelope-from=\" {}\" ; helo={};" ,
201- hostname, ip_addr, mail_from, helo
200+ "\r \n \t receiver={hostname}; client-ip={ip_addr}; envelope-from=\" {mail_from}\" ; helo={helo};" ,
202201 )
203202 . ok ( ) ;
204203
@@ -211,38 +210,31 @@ impl SpfResult {
211210 match & self {
212211 SpfResult :: Pass => write ! (
213212 header,
214- "pass ({}: domain of {} designates {} as permitted sender)" ,
215- hostname, mail_from, ip_addr
213+ "pass ({hostname}: domain of {mail_from} designates {ip_addr} as permitted sender)" ,
216214 ) ,
217215 SpfResult :: Fail => write ! (
218216 header,
219- "fail ({}: domain of {} does not designate {} as permitted sender)" ,
220- hostname, mail_from, ip_addr
217+ "fail ({hostname}: domain of {mail_from} does not designate {ip_addr} as permitted sender)" ,
221218 ) ,
222219 SpfResult :: SoftFail => write ! (
223220 header,
224- "softfail ({}: domain of {} reports soft fail for {})" ,
225- hostname, mail_from, ip_addr
221+ "softfail ({hostname}: domain of {mail_from} reports soft fail for {ip_addr})" ,
226222 ) ,
227223 SpfResult :: Neutral => write ! (
228224 header,
229- "neutral ({}: domain of {} reports neutral for {})" ,
230- hostname, mail_from, ip_addr
225+ "neutral ({hostname}: domain of {mail_from} reports neutral for {ip_addr})" ,
231226 ) ,
232227 SpfResult :: TempError => write ! (
233228 header,
234- "temperror ({}: temporary dns error validating {})" ,
235- hostname, mail_from
229+ "temperror ({hostname}: temporary dns error validating {mail_from})" ,
236230 ) ,
237231 SpfResult :: PermError => write ! (
238232 header,
239- "permerror ({}: unable to verify SPF record for {})" ,
240- hostname, mail_from,
233+ "permerror ({hostname}: unable to verify SPF record for {mail_from})" ,
241234 ) ,
242235 SpfResult :: None => write ! (
243236 header,
244- "none ({}: no SPF records found for {})" ,
245- hostname, mail_from
237+ "none ({hostname}: no SPF records found for {mail_from})" ,
246238 ) ,
247239 }
248240 . ok ( ) ;
@@ -343,7 +335,7 @@ impl AsAuthResult for Error {
343335 Error :: DnsError ( _) => "dns error" ,
344336 Error :: DnsRecordNotFound ( _) => "dns record not found" ,
345337 Error :: ArcInvalidInstance ( i) => {
346- write ! ( header, "invalid ARC instance {})" , i ) . ok ( ) ;
338+ write ! ( header, "invalid ARC instance {i })" ) . ok ( ) ;
347339 return ;
348340 }
349341 Error :: ArcInvalidCV => "invalid ARC cv" ,
0 commit comments