Samuel Onoja преди 9 месеца
родител
ревизия
52cdb3788d
променени са 2 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 1 1
      src/fs/dir.rs
  2. 3 3
      src/main.rs

+ 1 - 1
src/fs/dir.rs

@@ -43,7 +43,7 @@ impl Dir {
         }
     }
 
-    /// Reads the contents of the directory into DirEntry.
+    /// Reads the contents of the directory into `DirEntry`.
     ///
     /// It is recommended to use this method in conjunction with `new` in recursive
     /// calls, rather than `read_dir`, to avoid holding multiple open file descriptors

+ 3 - 3
src/main.rs

@@ -396,10 +396,10 @@ impl Exa<'_> {
                                 f.is_directory()
                             }) && !f.is_all_all
                         })
-                        .map(|f| f.to_dir())
+                        .map(fs::File::to_dir)
                         .collect::<Vec<Dir>>();
 
-                    self.print_files(Some(&dir), children)?;
+                    self.print_files(Some(dir), children)?;
                     match self.print_dirs(child_dirs, false, false, exit_status) {
                         Ok(_) => (),
                         Err(e) => return Err(e),
@@ -408,7 +408,7 @@ impl Exa<'_> {
                 }
             }
 
-            self.print_files(Some(&dir), children)?;
+            self.print_files(Some(dir), children)?;
         }
 
         if !denied_dirs.is_empty() {