@@ -124,9 +124,9 @@ impl Task for HashTask {
124124 let salt = SaltString :: generate ( & mut OsRng ) ;
125125 let hasher = self . options . to_argon ( ) ;
126126 hasher
127- . map_err ( |err| Error :: new ( Status :: InvalidArg , format ! ( "{}" , err ) ) ) ?
127+ . map_err ( |err| Error :: new ( Status :: InvalidArg , format ! ( "{err}" ) ) ) ?
128128 . hash_password ( self . password . as_slice ( ) , & salt)
129- . map_err ( |err| Error :: new ( Status :: GenericFailure , format ! ( "{}" , err ) ) )
129+ . map_err ( |err| Error :: new ( Status :: GenericFailure , format ! ( "{err}" ) ) )
130130 . map ( |h| h. to_string ( ) )
131131 }
132132
@@ -185,7 +185,7 @@ impl Task for RawHashTask {
185185 let hasher = self
186186 . options
187187 . to_argon ( )
188- . map_err ( |err| Error :: new ( Status :: InvalidArg , format ! ( "{}" , err ) ) ) ?;
188+ . map_err ( |err| Error :: new ( Status :: InvalidArg , format ! ( "{err}" ) ) ) ?;
189189 let output_len = hasher
190190 . params ( )
191191 . output_len ( )
@@ -194,7 +194,7 @@ impl Task for RawHashTask {
194194
195195 hasher
196196 . hash_password_into ( self . password . as_slice ( ) , salt. as_bytes ( ) , & mut output)
197- . map_err ( |err| Error :: new ( Status :: GenericFailure , format ! ( "{}" , err ) ) )
197+ . map_err ( |err| Error :: new ( Status :: GenericFailure , format ! ( "{err}" ) ) )
198198 . map ( |_| output)
199199 }
200200
@@ -251,11 +251,11 @@ impl Task for VerifyTask {
251251
252252 fn compute ( & mut self ) -> Result < Self :: Output > {
253253 let parsed_hash = argon2:: PasswordHash :: new ( self . hashed . as_str ( ) )
254- . map_err ( |err| Error :: new ( Status :: InvalidArg , format ! ( "{}" , err ) ) ) ?;
254+ . map_err ( |err| Error :: new ( Status :: InvalidArg , format ! ( "{err}" ) ) ) ?;
255255 let argon2 = self . options . to_argon ( ) ;
256256 Ok (
257257 argon2
258- . map_err ( |err| Error :: new ( Status :: InvalidArg , format ! ( "{}" , err ) ) ) ?
258+ . map_err ( |err| Error :: new ( Status :: InvalidArg , format ! ( "{err}" ) ) ) ?
259259 . verify_password ( self . password . as_bytes ( ) , & parsed_hash)
260260 . is_ok ( ) ,
261261 )
@@ -278,12 +278,12 @@ pub fn verify(
278278 password : match password {
279279 Either :: A ( s) => s,
280280 Either :: B ( b) => String :: from_utf8 ( b. to_vec ( ) )
281- . map_err ( |err| Error :: new ( Status :: InvalidArg , format ! ( "{}" , err ) ) ) ?,
281+ . map_err ( |err| Error :: new ( Status :: InvalidArg , format ! ( "{err}" ) ) ) ?,
282282 } ,
283283 hashed : match hashed {
284284 Either :: A ( s) => s,
285285 Either :: B ( b) => String :: from_utf8 ( b. to_vec ( ) )
286- . map_err ( |err| Error :: new ( Status :: InvalidArg , format ! ( "{}" , err ) ) ) ?,
286+ . map_err ( |err| Error :: new ( Status :: InvalidArg , format ! ( "{err}" ) ) ) ?,
287287 } ,
288288 options : options. unwrap_or_default ( ) ,
289289 } ,
@@ -302,12 +302,12 @@ pub fn verify_sync(
302302 password : match password {
303303 Either :: A ( s) => s,
304304 Either :: B ( b) => String :: from_utf8 ( b. to_vec ( ) )
305- . map_err ( |err| Error :: new ( Status :: InvalidArg , format ! ( "{}" , err ) ) ) ?,
305+ . map_err ( |err| Error :: new ( Status :: InvalidArg , format ! ( "{err}" ) ) ) ?,
306306 } ,
307307 hashed : match hashed {
308308 Either :: A ( s) => s,
309309 Either :: B ( b) => String :: from_utf8 ( b. to_vec ( ) )
310- . map_err ( |err| Error :: new ( Status :: InvalidArg , format ! ( "{}" , err ) ) ) ?,
310+ . map_err ( |err| Error :: new ( Status :: InvalidArg , format ! ( "{err}" ) ) ) ?,
311311 } ,
312312 options : options. unwrap_or_default ( ) ,
313313 } ;
0 commit comments