Skip to content

Commit

Permalink
remove explicit length checking
Browse files Browse the repository at this point in the history
  • Loading branch information
cvhammond committed Jan 29, 2024
1 parent d005bb2 commit e98727f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,6 @@ fn intel_f32(bytes: [u8; 4]) -> f32 {
/// Conversion of the raw bytes into dec f32 format based on the following:
/// https://stackoverflow.com/questions/64760137/how-to-display-dec-floating-point-format-given-32-bits-in-ieee-standard
fn dec_f32(bytes: [u8; 4]) -> f32 {
if bytes.len() != 4 {
return 0.0;
}
if bytes[1] == 0x00 {
let bytes = [bytes[2], bytes[3], bytes[0], bytes[1]];
f32::from_le_bytes(bytes)
Expand Down

0 comments on commit e98727f

Please sign in to comment.