aboutsummaryrefslogtreecommitdiff
path: root/lib/src/lints/collapsible_let_in.rs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/src/lints/collapsible_let_in.rs')
-rw-r--r--lib/src/lints/collapsible_let_in.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/src/lints/collapsible_let_in.rs b/lib/src/lints/collapsible_let_in.rs
index 878d218..cb76c37 100644
--- a/lib/src/lints/collapsible_let_in.rs
+++ b/lib/src/lints/collapsible_let_in.rs
@@ -1,12 +1,12 @@
1use crate::{make, Lint, Metadata, Report, Rule, Suggestion}; 1use crate::{make, Metadata, Report, Rule, Suggestion};
2 2
3use if_chain::if_chain; 3use if_chain::if_chain;
4use macros::lint; 4use macros::lint;
5use rowan::Direction;
6use rnix::{ 5use rnix::{
7 types::{LetIn, TypedNode}, 6 types::{LetIn, TypedNode},
8 NodeOrToken, SyntaxElement, SyntaxKind, TextRange 7 NodeOrToken, SyntaxElement, SyntaxKind, TextRange,
9}; 8};
9use rowan::Direction;
10 10
11#[lint( 11#[lint(
12 name = "collapsible let in", 12 name = "collapsible let in",
@@ -47,7 +47,7 @@ impl Rule for CollapsibleLetIn {
47 let replacement = make::empty().node().clone(); 47 let replacement = make::empty().node().clone();
48 48
49 Some( 49 Some(
50 Self::report() 50 self.report()
51 .diagnostic(first_annotation, first_message) 51 .diagnostic(first_annotation, first_message)
52 .suggest(second_annotation, second_message, Suggestion::new(replacement_at, replacement)) 52 .suggest(second_annotation, second_message, Suggestion::new(replacement_at, replacement))
53 ) 53 )
@@ -57,4 +57,3 @@ impl Rule for CollapsibleLetIn {
57 } 57 }
58 } 58 }
59} 59}
60