diff options
author | Steve Lau <stevelauc@outlook.com> | 2022-12-09 11:02:30 +0800 |
---|---|---|
committer | Steve Lau <stevelauc@outlook.com> | 2022-12-09 11:02:30 +0800 |
commit | f5dffcc7f089b3f33db0a2f771d56f330609b7e4 (patch) | |
tree | ff33a3704b9ae3a5a147f83d96bdbc9e0dfbfab9 /src/sys/statfs.rs | |
parent | a2356abe578dc822dbaf4386fbc17a63385ba0f8 (diff) | |
download | nix-f5dffcc7f089b3f33db0a2f771d56f330609b7e4.zip |
refactor: take AsFd by value
Diffstat (limited to 'src/sys/statfs.rs')
-rw-r--r-- | src/sys/statfs.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sys/statfs.rs b/src/sys/statfs.rs index 721d45cb..5111df2e 100644 --- a/src/sys/statfs.rs +++ b/src/sys/statfs.rs @@ -740,7 +740,7 @@ pub fn statfs<P: ?Sized + NixPath>(path: &P) -> Result<Statfs> { /// # Arguments /// /// `fd` - File descriptor of any open file within the file system to describe -pub fn fstatfs<Fd: AsFd>(fd: &Fd) -> Result<Statfs> { +pub fn fstatfs<Fd: AsFd>(fd: Fd) -> Result<Statfs> { unsafe { let mut stat = mem::MaybeUninit::<type_of_statfs>::uninit(); Errno::result(LIBC_FSTATFS(fd.as_fd().as_raw_fd(), stat.as_mut_ptr())) |