Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
haerdib committed Apr 13, 2023
1 parent 7f0490f commit 912f338
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion node-api/src/decoder/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ fn encode_variant_value<T>(
_ => return Err(EncodeError::WrongShape { actual: value, expected: type_id }),
};

let variant_type = ty.variants.iter().find(|v| &v.name == &variant.name);
let variant_type = ty.variants.iter().find(|v| v.name == variant.name);

let variant_type = match variant_type {
None => return Err(EncodeError::VariantNotFound { actual: variant, expected: type_id }),
Expand Down

0 comments on commit 912f338

Please sign in to comment.