aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2023-03-22 14:18:11 +0100
committerGitHub <noreply@github.com>2023-03-22 13:18:11 +0000
commit423775e903dfe630ad9af2f1dacdd1a1729023ae (patch)
tree0d45f977f196cdf4973b27d7f378beceb80e0b50 /src-tauri/src
parenta22486193ef49113851fab6f277d50f796ecc636 (diff)
downloadFlightCore-423775e903dfe630ad9af2f1dacdd1a1729023ae.tar.gz
FlightCore-423775e903dfe630ad9af2f1dacdd1a1729023ae.zip
fix: Address clippy errors in glibc parsing code (#226)
Diffstat (limited to 'src-tauri/src')
-rw-r--r--src-tauri/src/lib.rs3
-rw-r--r--src-tauri/src/platform_specific/linux.rs4
2 files changed, 3 insertions, 4 deletions
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index 2e0a0250..5bdc82c4 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -80,8 +80,7 @@ pub fn linux_checks_librs() -> Result<(), String> {
return Err(format!(
"GLIBC is not version {} or greater",
min_required_ldd_version
- )
- .to_string());
+ ));
};
// All checks passed
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::<f32>().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
}
/*