From 423775e903dfe630ad9af2f1dacdd1a1729023ae Mon Sep 17 00:00:00 2001 From: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> Date: Wed, 22 Mar 2023 14:18:11 +0100 Subject: fix: Address clippy errors in glibc parsing code (#226) --- src-tauri/src/platform_specific/linux.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src-tauri/src/platform_specific') diff --git a/src-tauri/src/platform_specific/linux.rs b/src-tauri/src/platform_specific/linux.rs index eb9fbea6..4b9964e9 100644 --- a/src-tauri/src/platform_specific/linux.rs +++ b/src-tauri/src/platform_specific/linux.rs @@ -14,10 +14,10 @@ pub fn check_glibc_v() -> f32 { let lddvl: Vec<&str> = lddva.split('\n').collect(); let lddvlo = &lddvl[0]; let reg = Regex::new(r"(2.\d{2}$)").unwrap(); - for caps in reg.captures_iter(lddvlo) { + if let Some(caps) = reg.captures_iter(lddvlo).next() { return caps.get(1).unwrap().as_str().parse::().unwrap(); // theres prolly a better way ijdk how tho } - return 0.0; // this shouldnt ever be reached but it has to be here + 0.0 // this shouldnt ever be reached but it has to be here } /* -- cgit v1.2.3