Skip to content

Commit

Permalink
Constify Bytes::is_empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyborus04 committed Nov 6, 2021
1 parent be7896f commit c7cbb55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ impl Bytes {
/// assert!(b.is_empty());
/// ```
#[inline]
pub fn is_empty(&self) -> bool {
pub const fn is_empty(&self) -> bool {
self.len == 0
}

Expand Down

0 comments on commit c7cbb55

Please sign in to comment.