Skip to content

Commit 57fa5ce

Browse files
committed
Formatted
1 parent ed0948d commit 57fa5ce

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

clippy_lints/src/map_identity.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use crate::utils::{
2-
is_adjusted, is_type_diagnostic_item, match_path, match_trait_method, match_var, paths, remove_blocks, span_lint_and_sugg,
2+
is_adjusted, is_type_diagnostic_item, match_path, match_trait_method, match_var, paths, remove_blocks,
3+
span_lint_and_sugg,
34
};
45
use if_chain::if_chain;
56
use rustc_errors::Applicability;
@@ -85,7 +86,8 @@ fn is_expr_identity_function(cx: &LateContext<'_, '_>, expr: &Expr<'_>) -> bool
8586
}
8687

8788
/// Checks if a function's body represents the identity function
88-
/// Looks for bodies of the form |x| x, |x| return x, |x| return x;, |x| { return x } or |x| { return x; }
89+
/// Looks for bodies of the form |x| x, |x| return x, |x| return x;, |x| { return x } or |x| {
90+
/// return x; }
8991
fn is_body_identity_function(cx: &LateContext<'_, '_>, func: &Body<'_>) -> bool {
9092
let params = func.params;
9193
let body = remove_blocks(&func.value);

0 commit comments

Comments
 (0)