diff options
| author | Akshay <[email protected]> | 2022-01-14 12:39:42 +0000 |
|---|---|---|
| committer | Akshay <[email protected]> | 2022-01-14 12:39:42 +0000 |
| commit | 7d732a051e695353db5a3ddbb26ab766ff736043 (patch) | |
| tree | aceda0db9a4c1d5ac64b9f061924e36ecf3f8ee9 /bin/src | |
| parent | d1ff222bcf94152cd657233cffd8c14a45788c26 (diff) | |
refactor parsing code, simplify tests
Diffstat (limited to 'bin/src')
| -rw-r--r-- | bin/src/utils.rs | 4 |
1 files changed, 3 insertions, 1 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 | } |
