Skip to content

Commit

Permalink
Add a must_use annotation to BytesMut::try_reclaim
Browse files Browse the repository at this point in the history
  • Loading branch information
shahn committed Apr 7, 2024
1 parent c42d6fa commit be44493
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/bytes_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,7 @@ impl BytesMut {
/// split.clear();
/// assert_eq!(true, split.try_reclaim());
/// ```
#[must_use = "consider BytesMut::reserve if you need a specific capacity"]
pub fn try_reclaim(&mut self) -> bool {
if !self.is_empty() {
return false;
Expand Down

0 comments on commit be44493

Please sign in to comment.