Inline to make OsStr::is_empty zero cost

This commit is contained in:
Lzu Tao
2020-01-10 18:20:40 +00:00
parent f795e8a216
commit 137a31d692
2 changed files with 2 additions and 0 deletions

View File

@@ -104,6 +104,7 @@ impl Buf {
self.inner.shrink_to(min_capacity)
}
#[inline]
pub fn as_slice(&self) -> &Slice {
unsafe { mem::transmute(&*self.inner) }
}