mirror of
https://github.com/pykeio/ort
synced 2026-04-25 16:34:55 +02:00
refactor: use rust 1.88 features
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user