Skip to content

Commit

Permalink
ci: fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
dj8yf0μl committed Jan 10, 2024
1 parent b314957 commit 039f1a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion borsh-derive/src/internals/deserialize/structs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub fn process(input: &ItemStruct, cratename: Path) -> syn::Result<TokenStream2>
}
}
Fields::Unnamed(fields) => {
for (_field_idx, field) in fields.unnamed.iter().enumerate() {
for field in fields.unnamed.iter() {
deserialize::process_field(field, &cratename, &mut body, &mut generics_output)?;
}
quote! {
Expand Down
4 changes: 1 addition & 3 deletions borsh/src/schema/container_ext/max_size.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ fn max_serialized_size_impl<'a>(
Ok(Definition::Primitive(size)) => match size {
0 => Ok(0),
size => {
let count_sizes = usize::try_from(*size)
.ok()
.and_then(|size| size.checked_mul(count.get()));
let count_sizes = usize::from(*size).checked_mul(count.get());
count_sizes.ok_or(Error::Overflow)
}
},
Expand Down

0 comments on commit 039f1a0

Please sign in to comment.