Skip to content

Commit ca37604

Browse files
committed
tidy features: use 2-parameter form of internal try macro for open err
This tiny patch merely applies @bluss's suggestion for how to get a more informative error message when the feature check can't open a file, a matter that had briefly annoyed the present author, leading to the filing of #38417.
1 parent d250169 commit ca37604

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/tidy/src/features.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub fn check(path: &Path, bad: &mut bool) {
6767
}
6868

6969
contents.truncate(0);
70-
t!(t!(File::open(file)).read_to_string(&mut contents));
70+
t!(t!(File::open(&file), &file).read_to_string(&mut contents));
7171

7272
for (i, line) in contents.lines().enumerate() {
7373
let mut err = |msg: &str| {

0 commit comments

Comments
 (0)