Skip to content

Commit

Permalink
Update fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
zakarumych committed Sep 19, 2023
1 parent 7acf90d commit 2b68cd0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/deserialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -762,11 +762,15 @@ where

if F::EXACT_SIZE {
let mut de = Deserializer::new(reference_size, &input[..reference_size]).unwrap();
let Ok(address) = de.read_value::<FixedUsize, usize>(true) else { unreachable!(); };
let Ok(address) = de.read_value::<FixedUsize, usize>(true) else {
unreachable!();
};
(address, unwrap_size(F::MAX_STACK_SIZE).min(len))
} else {
let mut de = Deserializer::new(reference_size, &input[..reference_size]).unwrap();
let Ok([size, address]) = de.read_value::<[FixedUsize; 2], [usize; 2]>(true) else { unreachable!(); };
let Ok([size, address]) = de.read_value::<[FixedUsize; 2], [usize; 2]>(true) else {
unreachable!();
};
(address, size)
}
}

0 comments on commit 2b68cd0

Please sign in to comment.