Skip to content

Commit

Permalink
Auto merge of #5168 - lily-commure:chars_next_style, r=flip1995
Browse files Browse the repository at this point in the history
Reclassify chars_next_cmp as a style lint.

This makes it consistent with chars_last_cmp.

changelog: none
  • Loading branch information
bors committed Feb 13, 2020
2 parents 06777d5 + 385fd7c commit 96c2e62
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
LintId::of(&mem_replace::MEM_REPLACE_OPTION_WITH_NONE),
LintId::of(&mem_replace::MEM_REPLACE_WITH_DEFAULT),
LintId::of(&methods::CHARS_LAST_CMP),
LintId::of(&methods::CHARS_NEXT_CMP),
LintId::of(&methods::INTO_ITER_ON_REF),
LintId::of(&methods::ITER_CLONED_COLLECT),
LintId::of(&methods::ITER_NTH_ZERO),
Expand Down Expand Up @@ -1494,7 +1495,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
LintId::of(&matches::MATCH_AS_REF),
LintId::of(&matches::MATCH_SINGLE_BINDING),
LintId::of(&matches::WILDCARD_IN_OR_PATTERNS),
LintId::of(&methods::CHARS_NEXT_CMP),
LintId::of(&methods::CLONE_ON_COPY),
LintId::of(&methods::FILTER_NEXT),
LintId::of(&methods::FLAT_MAP_IDENTITY),
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/methods/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ declare_clippy_lint! {
/// if name.starts_with('_') {};
/// ```
pub CHARS_NEXT_CMP,
complexity,
style,
"using `.chars().next()` to check if a string starts with a char"
}

Expand Down
2 changes: 1 addition & 1 deletion src/lintlist/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ pub const ALL_LINTS: [Lint; 355] = [
},
Lint {
name: "chars_next_cmp",
group: "complexity",
group: "style",
desc: "using `.chars().next()` to check if a string starts with a char",
deprecation: None,
module: "methods",
Expand Down

0 comments on commit 96c2e62

Please sign in to comment.