Skip to content

Commit 0c2f4ef

Browse files
committed
Swap the category of the lint
This changes the lint from the suspicious category to the complexity category
1 parent e72e9d9 commit 0c2f4ef

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

clippy_lints/src/lib.register_complexity.rs

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ store.register_group(true, "clippy::complexity", Some("clippy_complexity"), vec!
4848
LintId::of(methods::NEEDLESS_SPLITN),
4949
LintId::of(methods::OPTION_AS_REF_DEREF),
5050
LintId::of(methods::OPTION_FILTER_MAP),
51+
LintId::of(methods::OPTION_TAKE_ON_TEMPORARY),
5152
LintId::of(methods::OR_THEN_UNWRAP),
5253
LintId::of(methods::SEARCH_IS_SOME),
5354
LintId::of(methods::SKIP_WHILE_NEXT),

clippy_lints/src/lib.register_suspicious.rs

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ store.register_group(true, "clippy::suspicious", Some("clippy_suspicious"), vec!
2222
LintId::of(loops::EMPTY_LOOP),
2323
LintId::of(loops::FOR_LOOPS_OVER_FALLIBLES),
2424
LintId::of(loops::MUT_RANGE_BOUND),
25-
LintId::of(methods::OPTION_TAKE_ON_TEMPORARY),
2625
LintId::of(methods::SUSPICIOUS_MAP),
2726
LintId::of(mut_key::MUTABLE_KEY_TYPE),
2827
LintId::of(octal_escapes::OCTAL_ESCAPES),

clippy_lints/src/methods/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2146,7 +2146,7 @@ declare_clippy_lint! {
21462146
/// ```
21472147
#[clippy::version = "1.61.0"]
21482148
pub OPTION_TAKE_ON_TEMPORARY,
2149-
suspicious,
2149+
complexity,
21502150
"using `.as_ref().take()` on a temporary value"
21512151
}
21522152

0 commit comments

Comments
 (0)