diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/src/utils.rs | 4 | ||||
-rw-r--r-- | bin/tests/main.rs | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/bin/src/utils.rs b/bin/src/utils.rs index d374b4b..a3d51b4 100644 --- a/bin/src/utils.rs +++ b/bin/src/utils.rs | |||
@@ -30,6 +30,8 @@ pub fn get_version_info() -> Option<String> { | |||
30 | .output() | 30 | .output() |
31 | .expect("failed to execute"); | 31 | .expect("failed to execute"); |
32 | std::str::from_utf8(&program.stdout) | 32 | std::str::from_utf8(&program.stdout) |
33 | .ok() | 33 | .ok()? |
34 | .split(' ') | ||
35 | .nth(2) | ||
34 | .map(ToOwned::to_owned) | 36 | .map(ToOwned::to_owned) |
35 | } | 37 | } |
diff --git a/bin/tests/main.rs b/bin/tests/main.rs index 991c876..89d58e7 100644 --- a/bin/tests/main.rs +++ b/bin/tests/main.rs | |||
@@ -19,7 +19,7 @@ mod util { | |||
19 | test_lint!($($tail)*); | 19 | test_lint!($($tail)*); |
20 | }; | 20 | }; |
21 | ($tname:ident) => { | 21 | ($tname:ident) => { |
22 | test_lint!($tname => session_info!("nix (Nix) 2.5")); | 22 | test_lint!($tname => session_info!("2.5")); |
23 | }; | 23 | }; |
24 | ($tname:ident => $sess:expr) => { | 24 | ($tname:ident => $sess:expr) => { |
25 | #[test] | 25 | #[test] |
@@ -61,5 +61,5 @@ test_lint! { | |||
61 | unquoted_uri, | 61 | unquoted_uri, |
62 | deprecated_is_null, | 62 | deprecated_is_null, |
63 | empty_inherit, | 63 | empty_inherit, |
64 | faster_groupby => session_info!("nix (Nix) 2.5") | 64 | faster_groupby => session_info!("2.5") |
65 | } | 65 | } |