5
0
mirror of git://git.proxmox.com/git/proxmox-fuse.git synced 2024-12-21 13:34:41 +03:00

clippy fixes

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2024-02-13 13:56:56 +01:00
parent 2ca2cbce67
commit 0ba1420c7f
2 changed files with 5 additions and 5 deletions

View File

@ -578,11 +578,11 @@ impl Drop for FuseSession {
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);
}
}
}
@ -654,8 +654,8 @@ impl Unpin for Fuse {}
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());
}
}
}

View File

@ -343,7 +343,7 @@ impl ReplyBuf {
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,