Skip to content

Commit 0ef17dc

Browse files
dannycjonescberner
authored andcommitted
Fix warnings on stable Rust
1 parent 7e49f60 commit 0ef17dc

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ required-features = ["abi-7-12"]
7777

7878
[[example]]
7979
name = "notify_inval_inode"
80-
required-features = ["abi-7-12"]
80+
required-features = ["abi-7-15"]
8181

8282
[[example]]
8383
name = "ioctl"

examples/simple.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1098,6 +1098,10 @@ impl Filesystem for SimpleFS {
10981098
flags: u32,
10991099
reply: ReplyEmpty,
11001100
) {
1101+
debug!(
1102+
"rename() called with: source {parent:?} {name:?}, \
1103+
destination {new_parent:?} {new_name:?}, flags {flags:#b}",
1104+
);
11011105
let mut inode_attrs = match self.lookup_name(parent, name) {
11021106
Ok(attrs) => attrs,
11031107
Err(error_code) => {
@@ -1922,8 +1926,7 @@ fn as_file_kind(mut mode: u32) -> FileKind {
19221926
}
19231927

19241928
fn get_groups(pid: u32) -> Vec<u32> {
1925-
#[cfg(not(target_os = "macos"))]
1926-
{
1929+
if cfg!(not(target_os = "macos")) {
19271930
let path = format!("/proc/{pid}/task/{pid}/status");
19281931
let file = File::open(path).unwrap();
19291932
for line in BufReader::new(file).lines() {

src/request.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -615,9 +615,9 @@ impl<'a> Request<'a> {
615615
se.filesystem.setvolname(self, x.name(), self.reply());
616616
}
617617
#[cfg(target_os = "macos")]
618-
ll::Operation::GetXTimes(_) => {
618+
ll::Operation::GetXTimes(x) => {
619619
se.filesystem
620-
.getxtimes(self, self.request.nodeid().into(), self.reply());
620+
.getxtimes(self, x.nodeid().into(), self.reply());
621621
}
622622
#[cfg(target_os = "macos")]
623623
ll::Operation::Exchange(x) => {

tests/integration_tests.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// No integration tests for non-Linux targets, so turn off the module for now.
2+
#![cfg(target_os = "linux")]
3+
14
use fuser::{Filesystem, Session};
25
use std::rc::Rc;
36
use std::thread;
@@ -7,8 +10,10 @@ use tempfile::TempDir;
710
#[test]
811
#[cfg(target_os = "linux")]
912
fn unmount_no_send() {
10-
// Rc to make this !Send
11-
struct NoSendFS(Rc<()>);
13+
struct NoSendFS(
14+
// Rc to make this !Send
15+
#[allow(dead_code)] Rc<()>,
16+
);
1217

1318
impl Filesystem for NoSendFS {}
1419

0 commit comments

Comments
 (0)