refactor: use rust 1.88 features

This commit is contained in:
Carson M.
2025-12-05 15:44:11 -06:00
parent cc9a1df6f1
commit 3fd5f9f603
4 changed files with 14 additions and 13 deletions

View File

@@ -323,11 +323,11 @@ pub fn static_link(base_lib_dir: &Path) -> bool {
for entry in glob::glob(&pattern).unwrap() {
match entry {
Ok(path) => {
if let Some(lib_name) = path.file_name() {
if let Some(lib_name_str) = lib_name.to_str() {
let lib_name = lib_name_str.trim_start_matches("lib").trim_end_matches(".a");
println!("cargo:rustc-link-lib=static={}", lib_name);
}
if let Some(lib_name) = path.file_name()
&& let Some(lib_name_str) = lib_name.to_str()
{
let lib_name = lib_name_str.trim_start_matches("lib").trim_end_matches(".a");
println!("cargo:rustc-link-lib=static={}", lib_name);
}
}
Err(e) => eprintln!("error matching file: {}", e)

View File

@@ -2,6 +2,7 @@
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(clippy::type_complexity)]
#![allow(clippy::missing_safety_doc)]
#![cfg_attr(all(not(test), not(feature = "std")), no_std)]
extern crate alloc;