@@ -506,9 +506,9 @@ impl<Storage: driver::Storage> Filesystem<'_, Storage> {
506506 extern "C" fn lfs_config_erase ( c : * const ll:: lfs_config , block : ll:: lfs_block_t ) -> cty:: c_int {
507507 // println!("in lfs_config_erase");
508508 let storage = unsafe { & mut * ( ( * c) . context as * mut Storage ) } ;
509- let off = block as usize * Storage :: BLOCK_SIZE as usize ;
509+ let off = block as usize * Storage :: BLOCK_SIZE ;
510510
511- io:: error_code_from ( storage. erase ( off, Storage :: BLOCK_SIZE as usize ) )
511+ io:: error_code_from ( storage. erase ( off, Storage :: BLOCK_SIZE ) )
512512 }
513513
514514 /// C callback interface used by LittleFS to sync data with the lower level interface below the
@@ -673,7 +673,7 @@ impl<'a, 'b, Storage: driver::Storage> File<'a, 'b, Storage> {
673673
674674 // Safety-hatch to experiment with missing parts of API
675675 pub unsafe fn borrow_filesystem < ' c > ( & ' c mut self ) -> & ' c Filesystem < ' a , Storage > {
676- & self . fs
676+ self . fs
677677 }
678678
679679 /// Sync the file and drop it from the internal linked list.
@@ -1052,7 +1052,7 @@ impl<'a, 'b, S: driver::Storage> Iterator for ReadDir<'a, 'b, S> {
10521052impl < ' a , ' b , S : driver:: Storage > ReadDir < ' a , ' b , S > {
10531053 // Safety-hatch to experiment with missing parts of API
10541054 pub unsafe fn borrow_filesystem < ' c > ( & ' c mut self ) -> & ' c Filesystem < ' a , S > {
1055- & self . fs
1055+ self . fs
10561056 }
10571057}
10581058
@@ -1367,7 +1367,7 @@ mod tests {
13671367 let mut alloc = Allocation :: new ( ) ;
13681368 let fs = Filesystem :: mount ( & mut alloc, & mut test_storage) . unwrap ( ) ;
13691369 // fs.write(b"/z.txt\0".try_into().unwrap(), &jackson5).unwrap();
1370- fs. write ( & PathBuf :: from ( "z.txt" ) , & jackson5) . unwrap ( ) ;
1370+ fs. write ( & PathBuf :: from ( "z.txt" ) , jackson5) . unwrap ( ) ;
13711371 }
13721372
13731373 #[ cfg( feature = "dir-entry-path" ) ]
@@ -1446,7 +1446,7 @@ mod tests {
14461446 // One usecase is to read data from the files iterated over.
14471447 //
14481448 if entry. metadata . is_file ( ) {
1449- fs. write ( & entry. file_name ( ) , b"wowee zowie" ) ?;
1449+ fs. write ( entry. file_name ( ) , b"wowee zowie" ) ?;
14501450 }
14511451 }
14521452 Ok ( ( ) )
@@ -1477,11 +1477,11 @@ mod tests {
14771477 } ) ?;
14781478
14791479 let mut a1 = File :: allocate ( ) ;
1480- let f1 = unsafe { File :: open ( & fs, & mut a1, b"a.txt\0 " . try_into ( ) . unwrap ( ) ) ? } ;
1480+ let f1 = unsafe { File :: open ( fs, & mut a1, b"a.txt\0 " . try_into ( ) . unwrap ( ) ) ? } ;
14811481 f1. write ( b"some text" ) ?;
14821482
14831483 let mut a2 = File :: allocate ( ) ;
1484- let f2 = unsafe { File :: open ( & fs, & mut a2, b"b.txt\0 " . try_into ( ) . unwrap ( ) ) ? } ;
1484+ let f2 = unsafe { File :: open ( fs, & mut a2, b"b.txt\0 " . try_into ( ) . unwrap ( ) ) ? } ;
14851485 f2. write ( b"more text" ) ?;
14861486
14871487 unsafe { f1. close ( ) ? } ; // program hangs here
0 commit comments