diff options
Diffstat (limited to 'lib/src/lints/faster_groupby.rs')
-rw-r--r-- | lib/src/lints/faster_groupby.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/src/lints/faster_groupby.rs b/lib/src/lints/faster_groupby.rs index c496125..2a36f5f 100644 --- a/lib/src/lints/faster_groupby.rs +++ b/lib/src/lints/faster_groupby.rs | |||
@@ -27,7 +27,7 @@ use rnix::{ | |||
27 | /// | 27 | /// |
28 | /// Replace `lib.groupBy` with `builtins.groupBy`: | 28 | /// Replace `lib.groupBy` with `builtins.groupBy`: |
29 | /// | 29 | /// |
30 | /// ``` | 30 | /// ```nix |
31 | /// builtins.groupBy (x: if x > 2 then "big" else "small") [ 1 2 3 4 5 6 ]; | 31 | /// builtins.groupBy (x: if x > 2 then "big" else "small") [ 1 2 3 4 5 6 ]; |
32 | /// ``` | 32 | /// ``` |
33 | #[lint( | 33 | #[lint( |
@@ -40,7 +40,7 @@ struct FasterGroupBy; | |||
40 | 40 | ||
41 | impl Rule for FasterGroupBy { | 41 | impl Rule for FasterGroupBy { |
42 | fn validate(&self, node: &SyntaxElement, sess: &SessionInfo) -> Option<Report> { | 42 | fn validate(&self, node: &SyntaxElement, sess: &SessionInfo) -> Option<Report> { |
43 | let lint_version = "nix (Nix) 2.5".parse::<Version>().unwrap(); | 43 | let lint_version = "2.5".parse::<Version>().unwrap(); |
44 | if_chain! { | 44 | if_chain! { |
45 | if sess.version() >= &lint_version; | 45 | if sess.version() >= &lint_version; |
46 | if let NodeOrToken::Node(node) = node; | 46 | if let NodeOrToken::Node(node) = node; |