Skip to content

Commit 36e67d5

Browse files
xiongmao86flip1995
andauthored
Formatting.
Co-Authored-By: Philipp Krones <[email protected]>
1 parent eb7f9d8 commit 36e67d5

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

clippy_lints/src/eta_reduction.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,14 @@ fn check_closure(cx: &LateContext<'_, '_>, expr: &Expr<'_>) {
132132
if let Some(name) = get_ufcs_type_name(cx, method_def_id, &args[0]);
133133

134134
then {
135-
span_lint_and_sugg(cx, REDUNDANT_CLOSURE_FOR_METHOD_CALLS, expr.span, "redundant closure found",
136-
"remove closure as shown",
137-
format!("{}::{}", name, path.ident.name),
138-
Applicability::MachineApplicable,);
135+
span_lint_and_sugg(
136+
cx,
137+
REDUNDANT_CLOSURE_FOR_METHOD_CALLS,
138+
expr.span,
139+
"redundant closure found",
140+
"remove closure as shown",
141+
Applicability::MachineApplicable,
142+
);
139143
}
140144
);
141145
}

clippy_lints/src/ptr.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,10 @@ fn check_fn(cx: &LateContext<'_, '_>, decl: &FnDecl<'_>, fn_id: HirId, opt_body_
239239
PTR_ARG,
240240
arg.span,
241241
"using a reference to `Cow` is not recommended.",
242-
"change this to",
243-
"&".to_owned() + &r,
244-
Applicability::Unspecified,
245-
);
242+
"change this to",
243+
"&".to_owned() + &r,
244+
Applicability::Unspecified,
245+
);
246246
}
247247
}
248248
}

0 commit comments

Comments
 (0)