From 1986f90c6ae95f2c1f49f4c11390abb9a5eb4876 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 29 Apr 2022 15:58:13 -0700 Subject: [PATCH] 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::>()) | ^^^ 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 --- src/helpers.rs | 2 +- src/lib.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/helpers.rs b/src/helpers.rs index 57c85575942..34156c54b43 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -802,7 +802,7 @@ pub fn get_local_crates(tcx: &TyCtxt<'_>) -> Vec { // 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::>()) + .map(|crates| crates.split(',').map(|krate| krate.to_string()).collect::>()) .unwrap_or_default(); let mut local_crates = Vec::new(); for &crate_num in tcx.crates(()) { diff --git a/src/lib.rs b/src/lib.rs index 536fc957a3f..e67f161e863 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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,