Skip to content

Commit 1986f90

Browse files
committed
Resolve clippy::single_char_pattern
error: single-character string constant used as pattern --> src/helpers.rs:805:36 | 805 | .map(|crates| crates.split(",").map(|krate| krate.to_string()).collect::<Vec<_>>()) | ^^^ help: try using a `char` instead: `','` | = note: `-D clippy::single-char-pattern` implied by `-D clippy::all` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
1 parent 277d0b5 commit 1986f90

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/helpers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ pub fn get_local_crates(tcx: &TyCtxt<'_>) -> Vec<CrateNum> {
802802
// Convert the local crate names from the passed-in config into CrateNums so that they can
803803
// be looked up quickly during execution
804804
let local_crate_names = std::env::var("MIRI_LOCAL_CRATES")
805-
.map(|crates| crates.split(",").map(|krate| krate.to_string()).collect::<Vec<_>>())
805+
.map(|crates| crates.split(',').map(|krate| krate.to_string()).collect::<Vec<_>>())
806806
.unwrap_or_default();
807807
let mut local_crates = Vec::new();
808808
for &crate_num in tcx.crates(()) {

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
clippy::manual_map,
2121
clippy::needless_lifetimes,
2222
clippy::new_without_default,
23-
clippy::single_char_pattern,
2423
clippy::single_match,
2524
clippy::unnecessary_mut_passed,
2625
clippy::useless_conversion,

0 commit comments

Comments
 (0)