Skip to content

Commit 207484a

Browse files
committed
Make single_char_pattern clippy happy
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
1 parent cce92bd commit 207484a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/utils/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ pub(crate) fn toolchain_sort<T: AsRef<str>>(v: &mut Vec<T>) {
557557
} else if s.starts_with("nightly") {
558558
special_version(2, s)
559559
} else {
560-
Version::parse(&s.replace("_", "-")).unwrap_or_else(|_| special_version(3, s))
560+
Version::parse(&s.replace('_', "-")).unwrap_or_else(|_| special_version(3, s))
561561
}
562562
}
563563

tests/mock/clitools.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ fn print_indented(heading: &str, text: &str) {
463463
"{} ({} lines):\n {}",
464464
heading,
465465
lines,
466-
text.replace("\n", "\n ")
466+
text.replace('\n', "\n ")
467467
);
468468
}
469469

0 commit comments

Comments
 (0)