Skip to content

Commit

Permalink
🔨 chore: Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
queer committed Jul 7, 2024
1 parent b9c6ac7 commit 8c6da25
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ nix = { version = "0.29.0", features = [
"mount",
"sched",
"ptrace",
"signal",
"fs",
] }
owo-colors = { version = "4.0.0", features = [
"supports-color",
Expand Down
7 changes: 6 additions & 1 deletion src/enclosure/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@ impl FsDriver {

pub fn touch(&self, path: &Path) -> Result<()> {
debug!("touching {path:?}");
match OpenOptions::new().create(true).write(true).open(path) {
match OpenOptions::new()
.create(true)
.truncate(false)
.write(true)
.open(path)
{
Ok(_) => Ok(()),
Err(e) => Err(e.into()),
}
Expand Down
1 change: 1 addition & 0 deletions src/enclosure/syscall/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ fn get_fd_path(pid: Pid, fd: i32) -> Result<Option<PathBuf>> {
}
}

#[allow(unused)]
#[derive(Debug, Clone)]
pub struct Syscall {
pub name: String,
Expand Down

0 comments on commit 8c6da25

Please sign in to comment.