File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 33//! See [the man pages](https://pubs.opengroup.org/onlinepubs/9699919799/functions/fstatvfs.html)
44//! for more details.
55use std:: mem;
6- use std:: os:: unix:: io:: AsRawFd ;
6+ use std:: os:: unix:: io:: { AsFd , AsRawFd } ;
77
88use libc:: { self , c_ulong} ;
99
@@ -146,11 +146,11 @@ pub fn statvfs<P: ?Sized + NixPath>(path: &P) -> Result<Statvfs> {
146146}
147147
148148/// Return a `Statvfs` object with information about `fd`
149- pub fn fstatvfs < T : AsRawFd > ( fd : & T ) -> Result < Statvfs > {
149+ pub fn fstatvfs < Fd : AsFd > ( fd : Fd ) -> Result < Statvfs > {
150150 unsafe {
151151 Errno :: clear ( ) ;
152152 let mut stat = mem:: MaybeUninit :: < libc:: statvfs > :: uninit ( ) ;
153- Errno :: result ( libc:: fstatvfs ( fd. as_raw_fd ( ) , stat. as_mut_ptr ( ) ) )
153+ Errno :: result ( libc:: fstatvfs ( fd. as_fd ( ) . as_raw_fd ( ) , stat. as_mut_ptr ( ) ) )
154154 . map ( |_| Statvfs ( stat. assume_init ( ) ) )
155155 }
156156}
You can’t perform that action at this time.
0 commit comments