Skip to content
Snippets Groups Projects
Commit cdfd25f3 authored by Sean McArthur's avatar Sean McArthur Committed by Carl Lerche
Browse files

inline Bytes::len and Bytes::is_empty (#211)

parent 1ba5266b
No related branches found
No related tags found
No related merge requests found
......@@ -465,6 +465,7 @@ impl Bytes {
/// let b = Bytes::from(&b"hello"[..]);
/// assert_eq!(b.len(), 5);
/// ```
#[inline]
pub fn len(&self) -> usize {
self.inner.len()
}
......@@ -479,6 +480,7 @@ impl Bytes {
/// let b = Bytes::new();
/// assert!(b.is_empty());
/// ```
#[inline]
pub fn is_empty(&self) -> bool {
self.inner.is_empty()
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment