Skip to content

Commit 6854091

Browse files
authored
remove to_string_lossy
1 parent 4110581 commit 6854091

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/tidy/src/style.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ pub fn check(path: &Path, bad: &mut bool) {
400400
let mut comment_block: Option<(usize, usize)> = None;
401401
let is_test = file.components().any(|c| c.as_os_str() == "tests")
402402
|| file.file_stem().unwrap() == "tests";
403-
let is_style = file.to_string_lossy().ends_with(file!());
403+
let is_style = file.ends_with(file!());
404404
// scanning the whole file for multiple needles at once is more efficient than
405405
// executing lines times needles separate searches.
406406
let any_problematic_line = !is_style && !is_test && problematic_regex.is_match(contents);

0 commit comments

Comments
 (0)