Skip to content

Commit 9257a6e

Browse files
authored
Remove an unnecessary else branch (#662)
1 parent 0ba3b4c commit 9257a6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bytes_mut.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -726,11 +726,11 @@ impl BytesMut {
726726
}
727727

728728
return;
729-
} else {
730-
new_cap = cmp::max(new_cap, original_capacity);
731729
}
732730
}
733731

732+
new_cap = cmp::max(new_cap, original_capacity);
733+
734734
// Create a new vector to store the data
735735
let mut v = ManuallyDrop::new(Vec::with_capacity(new_cap));
736736

0 commit comments

Comments
 (0)