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
This commit is contained in:
David Tolnay 2022-04-29 15:58:13 -07:00
parent 277d0b53a7
commit 1986f90c6a
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 1 additions and 2 deletions

View File

@ -802,7 +802,7 @@ pub fn get_local_crates(tcx: &TyCtxt<'_>) -> Vec<CrateNum> {
// Convert the local crate names from the passed-in config into CrateNums so that they can
// be looked up quickly during execution
let local_crate_names = std::env::var("MIRI_LOCAL_CRATES")
.map(|crates| crates.split(",").map(|krate| krate.to_string()).collect::<Vec<_>>())
.map(|crates| crates.split(',').map(|krate| krate.to_string()).collect::<Vec<_>>())
.unwrap_or_default();
let mut local_crates = Vec::new();
for &crate_num in tcx.crates(()) {

View File

@ -20,7 +20,6 @@
clippy::manual_map,
clippy::needless_lifetimes,
clippy::new_without_default,
clippy::single_char_pattern,
clippy::single_match,
clippy::unnecessary_mut_passed,
clippy::useless_conversion,