Skip to content

Commit

Permalink
remove clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
stlankes committed Sep 17, 2023
1 parent e24451b commit 400ba8f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/fs/fuse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ impl PosixFile for FuseDir {
return Err(FileError::EBADF);
};

let (mut cmd, mut rsp) = create_read(nid, fh, len, self.offset as u64);
let (mut cmd, mut rsp) = create_read(nid, fh, len, self.offset);
cmd.header.opcode = Opcode::FUSE_READDIR as u32;
if let Some(fs_driver) = get_filesystem_driver() {
fs_driver.lock().send_command(cmd.as_ref(), rsp.as_mut());
Expand Down Expand Up @@ -682,7 +682,7 @@ fn create_getattr(
(*raw).cmd = fuse_getattr_in {
getattr_flags: flags,
dummy: 0,
fh: fh,
fh,
};

Box::from_raw(raw)
Expand Down
4 changes: 2 additions & 2 deletions src/syscalls/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ use hermit_sync::TicketMutex;
/// - FileDescriptor newtype
use crate::env::is_uhyve;
use crate::errno;
#[cfg(feature = "pci")]
#[cfg(feature = "fs")]
pub use crate::fs::fuse::fuse_dirent as Dirent;
#[cfg(not(feature = "pci"))]
#[cfg(not(feature = "fs"))]
pub struct Dirent;

// TODO: lazy static could be replaced with explicit init on OS boot.
Expand Down
1 change: 1 addition & 0 deletions src/syscalls/interfaces/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use core::ffi::CStr;

pub use self::generic::*;
pub use self::uhyve::*;
#[cfg(not(target_arch = "x86_64"))]
use crate::errno::ENOSYS;
use crate::syscalls::fs::{self, FileAttr};
use crate::{arch, env};
Expand Down

0 comments on commit 400ba8f

Please sign in to comment.