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 9da1814 commit 4bfe65aCopy full SHA for 4bfe65a
src/proto/h1/role.rs
@@ -92,7 +92,7 @@ where
92
/// Used when there was a partial read, to skip full parsing on a
93
/// a slow connection.
94
fn is_complete_fast(bytes: &[u8], prev_len: usize) -> bool {
95
- let start = if prev_len < 3 { 0 } else { prev_len - 3 };
+ let start = prev_len.saturating_sub(3);
96
let bytes = &bytes[start..];
97
98
for (i, b) in bytes.iter().copied().enumerate() {
0 commit comments