We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 697e59e commit b5d52ddCopy full SHA for b5d52dd
capnp-futures/src/serialize.rs
@@ -146,15 +146,9 @@ where
146
fn parse_segment_table_first(buf: &[u8]) -> Result<(usize, usize)> {
147
let segment_count = u32::from_le_bytes(buf[0..4].try_into().unwrap()).wrapping_add(1);
148
if segment_count >= 512 {
149
- return Err(Error::failed(format!(
150
- "Too many segments: {}",
151
- segment_count
152
- )));
+ return Err(Error::failed(format!("Too many segments: {segment_count}")));
153
} else if segment_count == 0 {
154
155
- "Too few segments: {}",
156
157
+ return Err(Error::failed(format!("Too few segments: {segment_count}")));
158
}
159
160
let first_segment_len = u32::from_le_bytes(buf[4..8].try_into().unwrap());
0 commit comments