aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bytes.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bytes.rs b/src/bytes.rs
index d0be0d2..c4fbd4a 100644
--- a/src/bytes.rs
+++ b/src/bytes.rs
@@ -179,7 +179,7 @@ impl Bytes {
/// assert_eq!(b.len(), 5);
/// ```
#[inline]
- pub fn len(&self) -> usize {
+ pub const fn len(&self) -> usize {
self.len
}
@@ -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
}