Skip to content

Commit f1f1940

Browse files
committed
Rename to redundant_closure
1 parent 4fcaab3 commit f1f1940

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ All notable changes to this project will be documented in this file.
10351035
[`redundant_clone`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
10361036
[`redundant_closure`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
10371037
[`redundant_closure_call`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
1038-
[`redundant_closures_for_method_calls`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closures_for_method_calls
1038+
[`redundant_closure_for_method_calls`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls
10391039
[`redundant_field_names`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
10401040
[`redundant_pattern`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern
10411041
[`redundant_pattern_matching`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching

clippy_lints/src/eta_reduction.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ declare_clippy_lint! {
4646
/// ```rust,ignore
4747
/// Some('a').map(char::to_uppercase);
4848
/// ```
49-
pub REDUNDANT_CLOSURES_FOR_METHOD_CALLS,
49+
pub REDUNDANT_CLOSURE_FOR_METHOD_CALLS,
5050
pedantic,
5151
"redundant closures for method calls"
5252
}
5353

54-
declare_lint_pass!(EtaReduction => [REDUNDANT_CLOSURE, REDUNDANT_CLOSURES_FOR_METHOD_CALLS]);
54+
declare_lint_pass!(EtaReduction => [REDUNDANT_CLOSURE, REDUNDANT_CLOSURE_FOR_METHOD_CALLS]);
5555

5656
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EtaReduction {
5757
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
@@ -123,7 +123,7 @@ fn check_closure(cx: &LateContext<'_, '_>, expr: &Expr) {
123123
if let Some(name) = get_ufcs_type_name(cx, method_def_id, &args[0]);
124124

125125
then {
126-
span_lint_and_then(cx, REDUNDANT_CLOSURES_FOR_METHOD_CALLS, expr.span, "redundant closure found", |db| {
126+
span_lint_and_then(cx, REDUNDANT_CLOSURE_FOR_METHOD_CALLS, expr.span, "redundant closure found", |db| {
127127
db.span_suggestion(
128128
expr.span,
129129
"remove closure as shown",

clippy_lints/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
614614
enum_glob_use::ENUM_GLOB_USE,
615615
enum_variants::MODULE_NAME_REPETITIONS,
616616
enum_variants::PUB_ENUM_VARIANT_NAMES,
617-
eta_reduction::REDUNDANT_CLOSURES_FOR_METHOD_CALLS,
617+
eta_reduction::REDUNDANT_CLOSURE_FOR_METHOD_CALLS,
618618
functions::TOO_MANY_LINES,
619619
if_not_else::IF_NOT_ELSE,
620620
infinite_iter::MAYBE_INFINITE_ITER,

0 commit comments

Comments
 (0)