diff --git a/mavlink-bindgen/src/parser.rs b/mavlink-bindgen/src/parser.rs index e6ee66f3ab..2b45e5d17b 100644 --- a/mavlink-bindgen/src/parser.rs +++ b/mavlink-bindgen/src/parser.rs @@ -1107,9 +1107,8 @@ pub fn parse_profile( assert!( is_valid_parent(stack.last().copied(), id), - "not valid parent {:?} of {:?}", + "not valid parent {:?} of {id:?}", stack.last(), - id ); match id { diff --git a/mavlink-core/src/bytes.rs b/mavlink-core/src/bytes.rs index 712ca36623..e1b11ff433 100644 --- a/mavlink-core/src/bytes.rs +++ b/mavlink-core/src/bytes.rs @@ -22,9 +22,8 @@ impl<'a> Bytes<'a> { fn check_remaining(&self, count: usize) { assert!( self.remaining() >= count, - "read buffer exhausted; remaining {} bytes, try read {} bytes", + "read buffer exhausted; remaining {} bytes, try read {count} bytes", self.remaining(), - count ); } diff --git a/mavlink-core/src/bytes_mut.rs b/mavlink-core/src/bytes_mut.rs index 1fc22b9cf6..df607c83c8 100644 --- a/mavlink-core/src/bytes_mut.rs +++ b/mavlink-core/src/bytes_mut.rs @@ -27,9 +27,8 @@ impl<'a> BytesMut<'a> { fn check_remaining(&self, count: usize) { assert!( self.remaining() >= count, - "write buffer overflow; remaining {} bytes, try add {} bytes", + "write buffer overflow; remaining {} bytes, try add {count} bytes", self.remaining(), - count ); } @@ -87,9 +86,7 @@ impl<'a> BytesMut<'a> { assert!( val <= MAX, "Attempted to put value that is too large for 24 bits, \ - attempted to push: {}, max allowed: {}", - val, - MAX + attempted to push: {val}, max allowed: {MAX}", ); let src = val.to_le_bytes(); @@ -106,16 +103,12 @@ impl<'a> BytesMut<'a> { assert!( val <= MAX, "Attempted to put value that is too large for 24 bits, \ - attempted to push: {}, max allowed: {}", - val, - MAX + attempted to push: {val}, max allowed: {MAX}", ); assert!( val >= MIN, "Attempted to put value that is too negative for 24 bits, \ - attempted to push: {}, min allowed: {}", - val, - MIN + attempted to push: {val}, min allowed: {MIN}", ); let src = val.to_le_bytes();