aboutsummaryrefslogtreecommitdiff
path: root/lib/src/lints/legacy_let_syntax.rs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/src/lints/legacy_let_syntax.rs')
-rw-r--r--lib/src/lints/legacy_let_syntax.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/src/lints/legacy_let_syntax.rs b/lib/src/lints/legacy_let_syntax.rs
index c5588e2..2087e27 100644
--- a/lib/src/lints/legacy_let_syntax.rs
+++ b/lib/src/lints/legacy_let_syntax.rs
@@ -23,15 +23,14 @@ impl Rule for ManualInherit {
23 23
24 if legacy_let 24 if legacy_let
25 .entries() 25 .entries()
26 .find(|kv| matches!(kv.key(), Some(k) if key_is_ident(&k, "body"))) 26 .any(|kv| matches!(kv.key(), Some(k) if key_is_ident(&k, "body")));
27 .is_some();
28 27
29 then { 28 then {
30 let inherits = legacy_let.inherits(); 29 let inherits = legacy_let.inherits();
31 let entries = legacy_let.entries(); 30 let entries = legacy_let.entries();
32 let attrset = make::attrset(inherits, entries, true); 31 let attrset = make::attrset(inherits, entries, true);
33 let parenthesized = make::parenthesize(&attrset.node()); 32 let parenthesized = make::parenthesize(attrset.node());
34 let selected = make::select(parenthesized.node(), &make::ident("body").node()); 33 let selected = make::select(parenthesized.node(), make::ident("body").node());
35 34
36 let at = node.text_range(); 35 let at = node.text_range();
37 let message = "Prefer `rec` over undocumented `let` syntax"; 36 let message = "Prefer `rec` over undocumented `let` syntax";