Skip to content

Commit 926e4f7

Browse files
committed
make this build.rs link more similar to the others
1 parent efc7a13 commit 926e4f7

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

ci/main/rt/build.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
1-
use std::env;
2-
use std::error::Error;
3-
use std::fs::File;
4-
use std::io::Write;
5-
use std::path::PathBuf;
1+
use std::{env, error::Error, fs::File, io::Write, path::PathBuf};
62

73
fn main() -> Result<(), Box<Error>> {
84
// build directory for this crate
9-
let mut out = PathBuf::from(env::var_os("OUT_DIR").unwrap());
5+
let out_dir = PathBuf::from(env::var_os("OUT_DIR").unwrap());
106

117
// extend the library search path
12-
println!("cargo:rustc-link-search={}", out.display());
8+
println!("cargo:rustc-link-search={}", out_dir.display());
139

1410
// put `link.x` in the build directory
15-
out.push("link.x");
16-
File::create(out)?.write_all(include_bytes!("link.x"))?;
11+
File::create(out_dir.join("link.x"))?.write_all(include_bytes!("link.x"))?;
1712

1813
Ok(())
1914
}

0 commit comments

Comments
 (0)