Skip to content

Commit

Permalink
Remove extra "reader.advance" from deserialize_any F16 parsing. (#31)
Browse files Browse the repository at this point in the history
The extra advance call was causing F16 parsing to fail since the F16 code also checks the leading byte (see issue #29).
  • Loading branch information
brusshamilton authored Aug 17, 2024
1 parent d8b1f23 commit c13214e
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/serde/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ impl<'de, 'a, R: dec::Read<'de>> serde::Deserializer<'de> for &'a mut Deserializ
},
#[cfg(feature = "half-f16")]
marker::F16 => {
de.reader.advance(1);
let v = half::f16::decode(&mut de.reader)?;
visitor.visit_f32(v.into())
},
Expand Down

0 comments on commit c13214e

Please sign in to comment.