This commit is contained in:
Sergey Pepyakin 2019-07-03 12:04:31 +02:00
parent af2788a06d
commit 9614eb9508
1 changed files with 4 additions and 1 deletions

View File

@ -89,6 +89,9 @@ impl ByteBuf {
}
pub fn as_slice_mut(&mut self) -> &mut [u8] {
self.mmap.as_mut().map(|m| m.as_slice_mut()).unwrap_or(&mut [])
self.mmap
.as_mut()
.map(|m| m.as_slice_mut())
.unwrap_or(&mut [])
}
}