Skip to content

Commit 731cff3

Browse files
committed
cleanup: run 'cargo fmt'
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
1 parent 1ebff0b commit 731cff3

3 files changed

Lines changed: 10 additions & 22 deletions

File tree

build.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,7 @@ fn main() {
232232

233233
// Expose the target triple to integration tests via env!("TARGET").
234234
// The cc crate needs this to find the correct compiler.
235-
println!(
236-
"cargo:rustc-env=TARGET={}",
237-
env::var("TARGET").unwrap()
238-
);
235+
println!("cargo:rustc-env=TARGET={}", env::var("TARGET").unwrap());
239236

240237
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
241238
let dest = out_dir.join("build_info.rs");

src/resolve/enums.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ fn resolve_literal_values(values: &mut [FlatEnum]) {
106106
// Build a name→literal map as we go (topo order guarantees targets are resolved first).
107107
let mut literals: HashMap<String, String> = HashMap::new();
108108
for v in values.iter_mut() {
109-
let resolved = literals.get(&v.value).cloned().unwrap_or_else(|| v.value.clone());
109+
let resolved = literals
110+
.get(&v.value)
111+
.cloned()
112+
.unwrap_or_else(|| v.value.clone());
110113
v.literal_value = resolved.clone();
111114
literals.insert(v.name.clone(), resolved);
112115
}

tests/integration_coverage.rs

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,7 @@ fn collect_files(root: &Path) -> Vec<std::path::PathBuf> {
104104
files
105105
}
106106

107-
fn collect_files_recursive(
108-
base: &Path,
109-
dir: &Path,
110-
out: &mut Vec<std::path::PathBuf>,
111-
) {
107+
fn collect_files_recursive(base: &Path, dir: &Path, out: &mut Vec<std::path::PathBuf>) {
112108
if let Ok(entries) = std::fs::read_dir(dir) {
113109
for entry in entries.flatten() {
114110
let path = entry.path();
@@ -147,10 +143,7 @@ fn assert_deterministic(args: &[&str]) {
147143
let files_a = collect_files(dir_a.path());
148144
let files_b = collect_files(dir_b.path());
149145

150-
assert_eq!(
151-
files_a, files_b,
152-
"file lists differ between runs"
153-
);
146+
assert_eq!(files_a, files_b, "file lists differ between runs");
154147
assert!(!files_a.is_empty(), "no files generated");
155148

156149
let path_a = dir_a.path().to_str().unwrap();
@@ -164,7 +157,8 @@ fn assert_deterministic(args: &[&str]) {
164157
let content_a = normalize_for_determinism(&raw_a, path_a);
165158
let content_b = normalize_for_determinism(&raw_b, path_b);
166159
assert_eq!(
167-
content_a, content_b,
160+
content_a,
161+
content_b,
168162
"file {} differs between runs (after normalizing out-path)",
169163
rel.display()
170164
);
@@ -452,13 +446,7 @@ fn unknown_api_name_fails() {
452446
fn empty_api_value_fails() {
453447
let dir = TempDir::new().unwrap();
454448
gloam()
455-
.args([
456-
"--api",
457-
"",
458-
"--out-path",
459-
dir.path().to_str().unwrap(),
460-
"c",
461-
])
449+
.args(["--api", "", "--out-path", dir.path().to_str().unwrap(), "c"])
462450
.assert()
463451
.failure();
464452
}

0 commit comments

Comments
 (0)