Jelajahi Sumber

Add some pointers

Ben S 11 tahun lalu
induk
melakukan
ab66c681c2
1 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 3 3
      src/options.rs

+ 3 - 3
src/options.rs

@@ -59,7 +59,7 @@ impl Options {
 
 
         match getopts::getopts(args.tail(), opts) {
         match getopts::getopts(args.tail(), opts) {
             Err(f) => Err(f),
             Err(f) => Err(f),
-            Ok(matches) => Ok(Options {
+            Ok(ref matches) => Ok(Options {
                 show_invisibles: matches.opt_present("all"),
                 show_invisibles: matches.opt_present("all"),
                 reverse: matches.opt_present("reverse"),
                 reverse: matches.opt_present("reverse"),
                 header: matches.opt_present("header"),
                 header: matches.opt_present("header"),
@@ -70,7 +70,7 @@ impl Options {
         }
         }
     }
     }
     
     
-    fn view(matches: getopts::Matches) -> View {
+    fn view(matches: &getopts::Matches) -> View {
         if matches.opt_present("long") {
         if matches.opt_present("long") {
             View::Details(Options::columns(matches))
             View::Details(Options::columns(matches))
         }
         }
@@ -85,7 +85,7 @@ impl Options {
         }
         }
     }
     }
     
     
-    fn columns(matches: getopts::Matches) -> Vec<Column> {
+    fn columns(matches: &getopts::Matches) -> Vec<Column> {
         let mut columns = vec![];
         let mut columns = vec![];
 
 
         if matches.opt_present("inode") {
         if matches.opt_present("inode") {