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 5
5
use std:: ffi:: CStr ;
6
6
use std:: fmt:: { self , Debug } ;
7
7
use std:: mem;
8
- use std:: os:: unix:: io:: AsRawFd ;
8
+ use std:: os:: unix:: io:: { AsFd , AsRawFd } ;
9
9
10
10
use cfg_if:: cfg_if;
11
11
@@ -740,10 +740,10 @@ pub fn statfs<P: ?Sized + NixPath>(path: &P) -> Result<Statfs> {
740
740
/// # Arguments
741
741
///
742
742
/// `fd` - File descriptor of any open file within the file system to describe
743
- pub fn fstatfs < T : AsRawFd > ( fd : & T ) -> Result < Statfs > {
743
+ pub fn fstatfs < Fd : AsFd > ( fd : & Fd ) -> Result < Statfs > {
744
744
unsafe {
745
745
let mut stat = mem:: MaybeUninit :: < type_of_statfs > :: uninit ( ) ;
746
- Errno :: result ( LIBC_FSTATFS ( fd. as_raw_fd ( ) , stat. as_mut_ptr ( ) ) )
746
+ Errno :: result ( LIBC_FSTATFS ( fd. as_fd ( ) . as_raw_fd ( ) , stat. as_mut_ptr ( ) ) )
747
747
. map ( |_| Statfs ( stat. assume_init ( ) ) )
748
748
}
749
749
}
You can’t perform that action at this time.
0 commit comments