Skip to content

Commit 32d5b00

Browse files
committed
chore: fix clippy warning
1 parent 1869567 commit 32d5b00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

derive/src/multihash.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ fn error_alloc_size(hashes: &[Hash], expected_alloc_size_type: &syn::Type) {
266266

267267
let maybe_error: Result<(), ParseError> = hashes
268268
.iter()
269-
.map(|hash| {
269+
.try_for_each(|hash| {
270270
// The digest type must have a size parameter of the shape `U<number>`, else we error.
271271
match hash.digest.segments.last() {
272272
Some(path_segment) => match &path_segment.arguments {
@@ -300,7 +300,7 @@ fn error_alloc_size(hashes: &[Hash], expected_alloc_size_type: &syn::Type) {
300300
},
301301
None => Err(ParseError(hash.digest.span())),
302302
}
303-
}).collect();
303+
});
304304

305305
if let Err(_error) = maybe_error {
306306
let msg = "Invalid byte size. It must be a unsigned integer typenum, e.g. `U32`";

0 commit comments

Comments
 (0)