Skip to content

Commit d709e6e

Browse files
committed
clippy::single_char_pattern
1 parent dc722bf commit d709e6e

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

compiler/rustc_codegen_llvm/src/llvm_util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ pub fn llvm_global_features(sess: &Session) -> Vec<String> {
365365

366366
features_string
367367
};
368-
features.extend(features_string.split(",").map(String::from));
368+
features.extend(features_string.split(',').map(String::from));
369369
}
370370
Some(_) | None => {}
371371
};
@@ -374,7 +374,7 @@ pub fn llvm_global_features(sess: &Session) -> Vec<String> {
374374
if s.is_empty() {
375375
return None;
376376
}
377-
let feature = if s.starts_with("+") || s.starts_with("-") {
377+
let feature = if s.starts_with('+') || s.starts_with('-') {
378378
&s[1..]
379379
} else {
380380
return Some(s.to_string());

compiler/rustc_expand/src/proc_macro_server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ fn ident_name_compatibility_hack(
834834
.flat_map(|c| c.as_os_str().to_str())
835835
.find(|c| c.starts_with("js-sys"))
836836
{
837-
let mut version = c.trim_start_matches("js-sys-").split(".");
837+
let mut version = c.trim_start_matches("js-sys-").split('.');
838838
if version.next() == Some("0")
839839
&& version.next() == Some("3")
840840
&& version

compiler/rustc_session/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1876,7 +1876,7 @@ fn parse_extern_dep_specs(
18761876
)
18771877
});
18781878

1879-
let locparts: Vec<_> = loc.split(":").collect();
1879+
let locparts: Vec<_> = loc.split(':').collect();
18801880
let spec = match &locparts[..] {
18811881
["raw", ..] => {
18821882
// Don't want `:` split string

compiler/rustc_session/src/options.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ mod parse {
684684
Some(v) => v,
685685
};
686686

687-
*slot = Some(match v.trim_end_matches("s") {
687+
*slot = Some(match v.trim_end_matches('s') {
688688
"statement" | "stmt" => MirSpanview::Statement,
689689
"terminator" | "term" => MirSpanview::Terminator,
690690
"block" | "basicblock" => MirSpanview::Block,

0 commit comments

Comments
 (0)