Ver código fonte

link_partial: cleanup

Alexandre Janniaux 5 anos atrás
pai
commit
ae444407e5
1 arquivos alterados com 4 adições e 5 exclusões
  1. 4 5
      src/main.rs

+ 4 - 5
src/main.rs

@@ -50,18 +50,17 @@ fn extract(input: PathBuf, output_directory: PathBuf)
     Ok(vec![])
 }
 
-fn link_partial(inputs: Vec<PathBuf>, output: PathBuf)
+fn link_partial(inputs: Vec<PathBuf>, output: &PathBuf)
     -> Result<(), ()>
 {
-    let result = Command::new("ld")
+    Command::new("ld")
         // Enable partial linking
         .arg("-r")
         .arg("-o")
-        .arg(output)
+        .arg(&output)
         .args(&inputs)
         .output()
         .unwrap();
-
     Ok(())
 }
 
@@ -88,7 +87,7 @@ fn link(args: LocalizeArgs)
 
     let output = args.output_file; //fs::canonicalize(args.output_file).unwrap();
 
-    link_partial(files, output);
+    link_partial(files, &output);
 }
 
 fn main() {