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:
parent
2ca2cbce67
commit
0ba1420c7f
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user