We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
to_string_lossy
1 parent 4110581 commit 6854091Copy full SHA for 6854091
src/tools/tidy/src/style.rs
@@ -400,7 +400,7 @@ pub fn check(path: &Path, bad: &mut bool) {
400
let mut comment_block: Option<(usize, usize)> = None;
401
let is_test = file.components().any(|c| c.as_os_str() == "tests")
402
|| file.file_stem().unwrap() == "tests";
403
- let is_style = file.to_string_lossy().ends_with(file!());
+ let is_style = file.ends_with(file!());
404
// scanning the whole file for multiple needles at once is more efficient than
405
// executing lines times needles separate searches.
406
let any_problematic_line = !is_style && !is_test && problematic_regex.is_match(contents);
0 commit comments