File tree 1 file changed +3
-3
lines changed 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 3
3
//! See [the man pages](https://pubs.opengroup.org/onlinepubs/9699919799/functions/fstatvfs.html)
4
4
//! for more details.
5
5
use std:: mem;
6
- use std:: os:: unix:: io:: AsRawFd ;
6
+ use std:: os:: unix:: io:: { AsFd , AsRawFd } ;
7
7
8
8
use libc:: { self , c_ulong} ;
9
9
@@ -146,11 +146,11 @@ pub fn statvfs<P: ?Sized + NixPath>(path: &P) -> Result<Statvfs> {
146
146
}
147
147
148
148
/// 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 > {
150
150
unsafe {
151
151
Errno :: clear ( ) ;
152
152
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 ( ) ) )
154
154
. map ( |_| Statvfs ( stat. assume_init ( ) ) )
155
155
}
156
156
}
You can’t perform that action at this time.
0 commit comments