Skip to content

Commit

Permalink
Remove an unnecessary else branch (#662)
Browse files Browse the repository at this point in the history
  • Loading branch information
braddunbar committed Jan 28, 2024
1 parent 0ba3b4c commit 9257a6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bytes_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -726,11 +726,11 @@ impl BytesMut {
}

return;
} else {
new_cap = cmp::max(new_cap, original_capacity);
}
}

new_cap = cmp::max(new_cap, original_capacity);

// Create a new vector to store the data
let mut v = ManuallyDrop::new(Vec::with_capacity(new_cap));

Expand Down

0 comments on commit 9257a6e

Please sign in to comment.