@@ -8,7 +8,6 @@ use libsave3ds::Resource;
88use std:: collections:: HashMap ;
99use std:: ffi:: OsStr ;
1010use std:: io:: Read ;
11- use std:: time:: { Duration , SystemTime } ;
1211
1312#[ cfg( all( unix, feature = "unixfuse" ) ) ]
1413use {
1716 getegid, geteuid, EBADF , EEXIST , EIO , EISDIR , ENAMETOOLONG , ENOENT , ENOSPC , ENOSYS ,
1817 ENOTDIR , ENOTEMPTY , EROFS ,
1918 } ,
19+ std:: time:: { Duration , SystemTime } ,
2020} ;
2121
2222enum FileSystemOperation {
@@ -27,7 +27,7 @@ enum FileSystemOperation {
2727}
2828
2929fn is_legal_char ( c : u8 ) -> bool {
30- c >= 32 && c < 127 && c != 47 && c != 92
30+ ( 32 .. 127 ) . contains ( & c ) && c != 47 && c != 92
3131}
3232
3333trait NameConvert {
@@ -176,11 +176,15 @@ where
176176 Ok ( ( ) )
177177}
178178
179- fn import_impl < T : FileSystem > ( save : & T , dir : & T :: DirType , path : & std:: path:: Path ) -> Result < ( ) , Error >
179+ fn import_impl < T : FileSystem > (
180+ _save : & T ,
181+ dir : & T :: DirType ,
182+ path : & std:: path:: Path ,
183+ ) -> Result < ( ) , Error >
180184where
181185 T :: NameType : NameConvert + Clone ,
182186{
183- for entry in std:: fs:: read_dir ( & path) ? {
187+ for entry in std:: fs:: read_dir ( path) ? {
184188 let entry = entry?;
185189 println ! ( "{:?}" , entry. path( ) ) ;
186190 let name = if let Some ( name) = entry
@@ -198,7 +202,7 @@ where
198202 let file_type = entry. file_type ( ) ?;
199203 if file_type. is_dir ( ) {
200204 let dir = dir. new_sub_dir ( name) ?;
201- import_impl ( save , & dir, & entry. path ( ) ) ?
205+ import_impl ( _save , & dir, & entry. path ( ) ) ?
202206 } else if file_type. is_file ( ) {
203207 let mut host_file = std:: fs:: File :: open ( & entry. path ( ) ) ?;
204208 let len = host_file. metadata ( ) ?. len ( ) as usize ;
@@ -230,7 +234,11 @@ where
230234}
231235
232236#[ allow( unreachable_code, unused_variables) ]
233- fn do_mount < T : FileSystem > ( save : T , read_only : bool , mountpoint : & std:: path:: Path ) -> Result < ( ) , Error >
237+ fn do_mount < T : FileSystem > (
238+ save : T ,
239+ read_only : bool ,
240+ mountpoint : & std:: path:: Path ,
241+ ) -> Result < ( ) , Error >
234242where
235243 T :: NameType : NameConvert + Clone ,
236244{
0 commit comments