Skip to content

Commit 67389d7

Browse files
committed
tidy
1 parent 0c7c510 commit 67389d7

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/tools/run-make-support/src/symbols.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
use std::path::Path;
1+
use object::{self, Object, ObjectSymbol, SymbolIterator};
22
use std::fs;
3-
use object::{self, Object, SymbolIterator, ObjectSymbol};
3+
use std::path::Path;
44

55
/// iterate through the symbols in an object file.
66
///
77
/// uses a callback because SymbolIterator does not own its data
8-
pub fn with_symbol_iter<P, F, R>(path: P, func: F) -> R where
8+
pub fn with_symbol_iter<P, F, R>(path: P, func: F) -> R
9+
where
910
P: AsRef<Path>,
1011
//I: Iterator + 'a,
1112
F: FnOnce(&mut SymbolIterator<'_, '_>) -> R,
1213
{
1314
let raw_bytes = fs::read(path).expect("unable to read file");
14-
let f = object::File::parse(raw_bytes.as_slice())
15-
.expect("unable to parse file");
15+
let f = object::File::parse(raw_bytes.as_slice()).expect("unable to parse file");
1616
let mut iter = f.symbols();
1717
func(&mut iter)
1818
}
@@ -21,7 +21,10 @@ pub fn any_symbol_contains(path: impl AsRef<Path>, substrings: &[&str]) -> bool
2121
with_symbol_iter(path, |syms| {
2222
for sym in syms {
2323
for substring in substrings {
24-
if sym.name_bytes().unwrap().windows(substring.len())
24+
if sym
25+
.name_bytes()
26+
.unwrap()
27+
.windows(substring.len())
2528
.any(|x| x == substring.as_bytes())
2629
{
2730
eprintln!("{:?} contains {}", sym, substring);

src/tools/tidy/src/allowed_run_make_makefiles.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ run-make/extern-flag-disambiguates/Makefile
2020
run-make/extern-fn-reachable/Makefile
2121
run-make/extern-multiple-copies/Makefile
2222
run-make/extern-multiple-copies2/Makefile
23-
run-make/fmt-write-bloat/Makefile
2423
run-make/foreign-double-unwind/Makefile
2524
run-make/foreign-exceptions/Makefile
2625
run-make/foreign-rust-exceptions/Makefile

0 commit comments

Comments
 (0)