From 7d732a051e695353db5a3ddbb26ab766ff736043 Mon Sep 17 00:00:00 2001 From: Akshay Date: Fri, 14 Jan 2022 18:09:42 +0530 Subject: refactor parsing code, simplify tests --- bin/src/utils.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bin/src') 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 { .output() .expect("failed to execute"); std::str::from_utf8(&program.stdout) - .ok() + .ok()? + .split(' ') + .nth(2) .map(ToOwned::to_owned) } -- cgit v1.2.3