diff --git a/zng/cmake.rs b/zng/cmake.rs index 6bfc949..81456eb 100644 --- a/zng/cmake.rs +++ b/zng/cmake.rs @@ -1,5 +1,4 @@ use std::env; -use std::ffi::OsStr; pub fn build_zlib_ng(target: &str, compat: bool) { let mut cmake = cmake::Config::new("src/zlib-ng"); @@ -19,10 +18,10 @@ pub fn build_zlib_ng(target: &str, compat: bool) { // Check if we should pass on an explicit boolean value of the WITH_RVV build option. // See: https://github.com/zlib-ng/zlib-ng?tab=readme-ov-file#advanced-build-options match env::var_os("RISCV_WITH_RVV") - .map(OsStr::to_str) + .map(|v| v.to_str()) .map(str::trim) .map(str::to_uppercase) - .map(Into::into) + .as_deref() { Some("OFF" | "NO" | "FALSE" | "0") => { // Force RVV off. This turns off RVV entirely, as well as the runtime check for it.