소스 검색

link_partial: cleanup

Alexandre Janniaux 5 년 전
부모
커밋
ae444407e5
1개의 변경된 파일4개의 추가작업 그리고 5개의 파일을 삭제
  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() {