Skip to content

Commit 1525f9d

Browse files
committed
zephyr-build: fmt update
Run `cargo fmt` to canonicalize the code. This is just some whitespace cleanup. Signed-off-by: David Brown <[email protected]>
1 parent d537adc commit 1525f9d

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

zephyr-build/src/lib.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
// This builds a program that is run on the compilation host before the code is compiled. It can
1212
// output configuration settings that affect the compilation.
1313

14-
use std::io::{BufRead, BufReader, Write};
1514
use std::env;
1615
use std::fs::File;
16+
use std::io::{BufRead, BufReader, Write};
1717
use std::path::Path;
1818

1919
use regex::Regex;
@@ -31,7 +31,7 @@ pub fn export_bool_kconfig() {
3131

3232
let file = File::open(&dotconfig).expect("Unable to open dotconfig");
3333
for line in BufReader::new(file).lines() {
34-
let line = line.expect("reading line from dotconfig");
34+
let line = line.expect("reading line from dotconfig");
3535
if let Some(caps) = config_y.captures(&line) {
3636
println!("cargo:rustc-cfg={}", &caps[1]);
3737
}
@@ -60,16 +60,18 @@ pub fn build_kconfig_mod() {
6060
let line = line.expect("reading line from dotconfig");
6161
if let Some(caps) = config_hex.captures(&line) {
6262
writeln!(&mut f, "#[allow(dead_code)]").unwrap();
63-
writeln!(&mut f, "pub const {}: usize = {};",
64-
&caps[1], &caps[2]).unwrap();
63+
writeln!(&mut f, "pub const {}: usize = {};", &caps[1], &caps[2]).unwrap();
6564
} else if let Some(caps) = config_int.captures(&line) {
6665
writeln!(&mut f, "#[allow(dead_code)]").unwrap();
67-
writeln!(&mut f, "pub const {}: isize = {};",
68-
&caps[1], &caps[2]).unwrap();
66+
writeln!(&mut f, "pub const {}: isize = {};", &caps[1], &caps[2]).unwrap();
6967
} else if let Some(caps) = config_str.captures(&line) {
7068
writeln!(&mut f, "#[allow(dead_code)]").unwrap();
71-
writeln!(&mut f, "pub const {}: &'static str = {};",
72-
&caps[1], &caps[2]).unwrap();
69+
writeln!(
70+
&mut f,
71+
"pub const {}: &'static str = {};",
72+
&caps[1], &caps[2]
73+
)
74+
.unwrap();
7375
}
7476
}
7577
}

0 commit comments

Comments
 (0)