Skip to content

Commit 4be2082

Browse files
Run rustfmt
1 parent 318abe2 commit 4be2082

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

build.rs

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ fn main() {
1414
let cargo_path = env::var("CARGO").expect("Missing CARGO environment variable");
1515
let cargo = Path::new(&cargo_path);
1616

17-
let manifest_dir_path = env::var("CARGO_MANIFEST_DIR").expect("Missing CARGO_MANIFEST_DIR environment variable");
17+
let manifest_dir_path =
18+
env::var("CARGO_MANIFEST_DIR").expect("Missing CARGO_MANIFEST_DIR environment variable");
1819
let manifest_dir = Path::new(&manifest_dir_path);
1920

2021
// Find the objcopy binary
@@ -41,9 +42,7 @@ fn main() {
4142
// Build stage 2
4243
build_subproject(
4344
Path::new("src/real/stage_2"),
44-
&[
45-
"second_stage",
46-
],
45+
&["second_stage"],
4746
"../i8086-real_mode.json",
4847
&out_dir,
4948
&objcopy,
@@ -59,8 +58,14 @@ fn build_subproject(
5958
objcopy: &Path,
6059
cargo: &Path,
6160
) {
62-
let subproject_name = subproject_dir.file_stem().expect("Couldn't get subproject name").to_str().expect("Subproject Name is not valid UTF-8");
63-
let target_file = Path::new(&target_file_path).file_stem().expect("Couldn't get target file stem");
61+
let subproject_name = subproject_dir
62+
.file_stem()
63+
.expect("Couldn't get subproject name")
64+
.to_str()
65+
.expect("Subproject Name is not valid UTF-8");
66+
let target_file = Path::new(&target_file_path)
67+
.file_stem()
68+
.expect("Couldn't get target file stem");
6469
let target_dir = root_out_dir.join("target").join(&subproject_name);
6570

6671
// We have to export at least 1 symbol
@@ -98,9 +103,9 @@ fn build_subproject(
98103
// Use passed objcopy
99104
let mut objcopy_cmd = Command::new(objcopy);
100105

101-
// Localize all symbols except those passed
106+
// Localize all symbols except those passed
102107
for symbol in global_symbols {
103-
objcopy_cmd.arg("-G").arg(symbol);
108+
objcopy_cmd.arg("-G").arg(symbol);
104109
}
105110

106111
// Pass the binary as argument

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
mod panic;
55

66
#[no_mangle]
7-
fn bootloader_no_optimize() {}
7+
fn bootloader_no_optimize() {}

0 commit comments

Comments
 (0)