Skip to content

Commit

Permalink
Use ok_or
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhauner committed Dec 5, 2024
1 parent c01cd75 commit cda11f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ssz_derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ fn ssz_decode_derive_struct(item: &DeriveInput, struct_data: &DataStruct) -> Tok
fixed_decodes.push(quote! {
let (slice, bytes) = bytes
.split_at_checked(#ssz_fixed_len)
.ok_or_else(|| ssz::DecodeError::InvalidByteLength {
.ok_or(ssz::DecodeError::InvalidByteLength {
len: bytes.len(),
expected: #ssz_fixed_len
})?;
Expand Down

0 comments on commit cda11f3

Please sign in to comment.