diff options
author | Akshay <[email protected]> | 2021-10-19 11:30:03 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2021-10-19 11:30:03 +0100 |
commit | d666cfa6b1739ac17d080790068e31eb26bb9c4a (patch) | |
tree | 814ffd195695ca5e10aef49039be83995127f366 /lib/src/lints | |
parent | 214e3bc4b675b08ce4df76b1373f4548949e67ee (diff) |
rework few error messages
Diffstat (limited to 'lib/src/lints')
-rw-r--r-- | lib/src/lints/collapsible_let_in.rs | 4 | ||||
-rw-r--r-- | lib/src/lints/manual_inherit.rs | 2 | ||||
-rw-r--r-- | lib/src/lints/manual_inherit_from.rs | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/src/lints/collapsible_let_in.rs b/lib/src/lints/collapsible_let_in.rs index c2cdf9b..878d218 100644 --- a/lib/src/lints/collapsible_let_in.rs +++ b/lib/src/lints/collapsible_let_in.rs | |||
@@ -26,10 +26,10 @@ impl Rule for CollapsibleLetIn { | |||
26 | if LetIn::cast(body.clone()).is_some(); | 26 | if LetIn::cast(body.clone()).is_some(); |
27 | then { | 27 | then { |
28 | let first_annotation = node.text_range(); | 28 | let first_annotation = node.text_range(); |
29 | let first_message = "This let-in expression contains a nested let-in expression"; | 29 | let first_message = "This `let in` expression contains a nested `let in` expression"; |
30 | 30 | ||
31 | let second_annotation = body.text_range(); | 31 | let second_annotation = body.text_range(); |
32 | let second_message = "This let-in expression is nested"; | 32 | let second_message = "This `let in` expression is nested"; |
33 | 33 | ||
34 | let replacement_at = { | 34 | let replacement_at = { |
35 | let start = body | 35 | let start = body |
diff --git a/lib/src/lints/manual_inherit.rs b/lib/src/lints/manual_inherit.rs index 717d190..3524dd3 100644 --- a/lib/src/lints/manual_inherit.rs +++ b/lib/src/lints/manual_inherit.rs | |||
@@ -32,7 +32,7 @@ impl Rule for ManualInherit { | |||
32 | then { | 32 | then { |
33 | let at = node.text_range(); | 33 | let at = node.text_range(); |
34 | let replacement = make::inherit_stmt(&[key]).node().clone(); | 34 | let replacement = make::inherit_stmt(&[key]).node().clone(); |
35 | let message = format!("The assignment `{}` is better written with `inherit`", node); | 35 | let message = format!("This assignment is better written with `inherit`"); |
36 | Some(Self::report().suggest(at, message, Suggestion::new(at, replacement))) | 36 | Some(Self::report().suggest(at, message, Suggestion::new(at, replacement))) |
37 | } else { | 37 | } else { |
38 | None | 38 | None |
diff --git a/lib/src/lints/manual_inherit_from.rs b/lib/src/lints/manual_inherit_from.rs index 41eb5cf..d7a00b2 100644 --- a/lib/src/lints/manual_inherit_from.rs +++ b/lib/src/lints/manual_inherit_from.rs | |||
@@ -37,7 +37,7 @@ impl Rule for ManualInherit { | |||
37 | let set = value.set()?; | 37 | let set = value.set()?; |
38 | make::inherit_from_stmt(set, &[key]).node().clone() | 38 | make::inherit_from_stmt(set, &[key]).node().clone() |
39 | }; | 39 | }; |
40 | let message = format!("The assignment `{}` is better written with `inherit`", node); | 40 | let message = format!("This assignment is better written with `inherit`"); |
41 | Some(Self::report().suggest(at, message, Suggestion::new(at, replacement))) | 41 | Some(Self::report().suggest(at, message, Suggestion::new(at, replacement))) |
42 | } else { | 42 | } else { |
43 | None | 43 | None |