Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
divi255 committed Sep 14, 2023
1 parent 838efba commit 9d718e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ pub fn guess_response_frame_len(buf: &[u8], proto: ModbusProto) -> Result<u8, Er
let func = f[1];
let len: usize = if func < 0x80 {
match func {
1 | 2 | 3 | 4 => (f[2] as usize + 3) * multiplier + extra,
1..=4 => (f[2] as usize + 3) * multiplier + extra,
5 | 6 | 15 | 16 => 6 * multiplier + extra,
_ => {
return Err(ErrorKind::FrameBroken);
Expand Down

0 comments on commit 9d718e9

Please sign in to comment.