Skip to content

Commit 12d389d

Browse files
committed
Fix CI: doc links and import formatting
- Change doc references from Channel::clone_fd() to Session::clone_fd() since Channel is crate-private but Session::clone_fd() is the public API - Run rustfmt to fix import ordering in channel.rs, session.rs, and integration_tests.rs
1 parent 84c488f commit 12d389d

3 files changed

Lines changed: 22 additions & 13 deletions

File tree

src/channel.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
use std::{
2-
io,
3-
os::{
4-
fd::{AsFd, BorrowedFd, FromRawFd, OwnedFd},
5-
unix::prelude::AsRawFd,
6-
},
7-
sync::Arc,
8-
};
1+
use std::io;
2+
use std::os::fd::AsFd;
3+
use std::os::fd::BorrowedFd;
4+
use std::os::fd::FromRawFd;
5+
use std::os::fd::OwnedFd;
6+
use std::os::unix::prelude::AsRawFd;
7+
use std::sync::Arc;
98

109
use crate::dev_fuse::DevFuse;
1110
use crate::passthrough::BackingId;

src/session.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,12 @@ impl<FS: Filesystem> Session<FS> {
157157

158158
/// Create a session from a cloned FUSE file descriptor for multi-reader setups.
159159
///
160-
/// Use this with fds obtained from [`Channel::clone_fd()`] when the primary
160+
/// Use this with fds obtained from [`Session::clone_fd()`] when the primary
161161
/// session has already completed the FUSE INIT handshake.
162162
///
163163
/// # Arguments
164164
/// * `filesystem` - The filesystem implementation to handle requests
165-
/// * `fd` - A cloned fd from [`Channel::clone_fd()`]
165+
/// * `fd` - A cloned fd from [`Session::clone_fd()`]
166166
/// * `acl` - Access control settings for the session
167167
///
168168
/// # Important
@@ -180,7 +180,10 @@ impl<FS: Filesystem> Session<FS> {
180180
allowed: acl,
181181
session_owner: geteuid(),
182182
// Skip INIT - caller guarantees mount is initialized
183-
proto_version: Some(Version(abi::FUSE_KERNEL_VERSION, abi::FUSE_KERNEL_MINOR_VERSION)),
183+
proto_version: Some(Version(
184+
abi::FUSE_KERNEL_VERSION,
185+
abi::FUSE_KERNEL_MINOR_VERSION,
186+
)),
184187
destroyed: false,
185188
}
186189
}

tests/integration_tests.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
use fuser::{Errno, FileHandle, Filesystem, INodeNo, Session, SessionACL};
21
use std::os::unix::fs::PermissionsExt;
32
use std::sync::Arc;
4-
use std::sync::atomic::{AtomicUsize, Ordering};
3+
use std::sync::atomic::AtomicUsize;
4+
use std::sync::atomic::Ordering;
55
use std::thread;
66
use std::time::Duration;
7+
8+
use fuser::Errno;
9+
use fuser::FileHandle;
10+
use fuser::Filesystem;
11+
use fuser::INodeNo;
12+
use fuser::Session;
13+
use fuser::SessionACL;
714
use tempfile::TempDir;
815

916
/// Test that clone_fd creates a working file descriptor for multi-reader setups.

0 commit comments

Comments
 (0)