Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
fn drop(&mut self) {
unsafe {
if self.mounted {
- let _ = sys::fuse_session_unmount(self.session);
+ sys::fuse_session_unmount(self.session);
}
if !self.session.is_null() {
- let _ = sys::fuse_session_destroy(self.session);
+ sys::fuse_session_destroy(self.session);
}
}
}
impl Drop for Fuse {
fn drop(&mut self) {
unsafe {
- let _ = sys::fuse_session_unmount(self.session.as_ptr());
- let _ = sys::fuse_session_destroy(self.session.as_ptr());
+ sys::fuse_session_unmount(self.session.as_ptr());
+ sys::fuse_session_destroy(self.session.as_ptr());
}
}
}
pub fn new(request: Request, size: usize) -> Self {
let buffer = unsafe {
let data = std::alloc::alloc(std::alloc::Layout::array::<u8>(size).unwrap());
- Vec::from_raw_parts(data as *mut u8, size, size)
+ Vec::from_raw_parts(data, size, size)
};
Self {
buffer,