9
9
//! # GitFS: a FUSE filesystem for Git objects
10
10
11
11
#![ feature( asm) ]
12
- #![ feature( core ) ]
12
+ #![ feature( convert ) ]
13
13
#![ feature( libc) ]
14
14
#![ feature( std_misc) ]
15
15
@@ -30,7 +30,7 @@ use std::default::Default;
30
30
use std:: ffi:: { OsString , AsOsStr } ;
31
31
use std:: os:: unix:: ffi:: OsStrExt ;
32
32
use std:: fs;
33
- use std:: path:: { AsPath , Path , PathBuf } ;
33
+ use std:: path:: { Path , PathBuf } ;
34
34
use std:: u64;
35
35
36
36
use inode:: { Id , InodeContainer , InodeMapper } ;
@@ -76,26 +76,26 @@ impl GitFS {
76
76
}
77
77
78
78
fn mount_options ( & self ) -> OsString {
79
- let mut options = OsString :: from_str ( "-oro,default_permissions,fsname=" ) ;
79
+ let mut options = OsString :: from ( "-oro,default_permissions,fsname=" ) ;
80
80
options. push ( & self . repo . path ( ) ) ; // FIXME escape commas?
81
81
options
82
82
}
83
83
84
84
/// Mount the filesystem and wait until the path is unmounted, e.g. with the command
85
85
/// `fusermount -u PATH`.
86
- pub fn mount < P : AsPath > ( mut self , mountpoint : & P ) {
86
+ pub fn mount < P : AsRef < Path > > ( mut self , mountpoint : & P ) {
87
87
// Create/remove the mount point if it doesn't exist
88
- self . mountdir = DirHandle :: new ( mountpoint. as_path ( ) ) ;
88
+ self . mountdir = DirHandle :: new ( mountpoint. as_ref ( ) ) ;
89
89
90
90
let options = self . mount_options ( ) ;
91
91
fuse:: mount ( self , mountpoint, & [ & options] )
92
92
}
93
93
94
94
/// Mount the filesystem in the background. It will remain mounted until the returned session
95
95
/// object is dropped, or an external umount is issued.
96
- pub fn spawn_mount < P : AsPath > ( mut self , mountpoint : & P ) -> std:: io:: Result < fuse:: BackgroundSession > {
96
+ pub fn spawn_mount < P : AsRef < Path > > ( mut self , mountpoint : & P ) -> std:: io:: Result < fuse:: BackgroundSession > {
97
97
// Create/remove the mount point if it doesn't exist
98
- self . mountdir = DirHandle :: new ( mountpoint. as_path ( ) ) ;
98
+ self . mountdir = DirHandle :: new ( mountpoint. as_ref ( ) ) ;
99
99
100
100
let options = self . mount_options ( ) ;
101
101
fuse:: spawn_mount ( self , mountpoint, & [ & options] )
0 commit comments