Fix clippy warnings

This commit is contained in:
lumi 2025-06-23 07:18:03 +10:00
parent e08ff38803
commit 884acd71e1
Signed by: luaneko
GPG Key ID: 406809B8763FF07A

View File

@ -118,7 +118,7 @@ fn build_runtime(src_path: &Path) {
let mut make = find_make(); let mut make = find_make();
make.current_dir(&src_path) make.current_dir(src_path)
.env_clear() .env_clear()
.arg("-e") .arg("-e")
.env("PATH", env!("PATH")) .env("PATH", env!("PATH"))
@ -160,7 +160,7 @@ fn build_runtime(src_path: &Path) {
// host toolchain config // host toolchain config
match (host_ptr_width, target_ptr_width) { match (host_ptr_width, target_ptr_width) {
(64, 64) | (32, 32) => make.env("HOST_CC", &host_cc), (64, 64) | (32, 32) => make.env("HOST_CC", &host_cc),
(64, 32) => make.env("HOST_CC", format!("{} -m32", host_cc)), (64, 32) => make.env("HOST_CC", format!("{host_cc} -m32")),
(n, m) if n != m => panic!("cannot cross-compile on {n}-bit host for {m}-bit target"), (n, m) if n != m => panic!("cannot cross-compile on {n}-bit host for {m}-bit target"),
(n, _) => panic!("unsupported {n}-bit architecture"), (n, _) => panic!("unsupported {n}-bit architecture"),
}; };
@ -196,7 +196,7 @@ fn build_runtime(src_path: &Path) {
} }
// propagate linker config // propagate linker config
if let Some(path) = env::var("RUSTC_LINKER").ok() { if let Ok(path) = env::var("RUSTC_LINKER") {
make.env("TARGET_LD", panic_err!(which(path), "failed to find ld")); make.env("TARGET_LD", panic_err!(which(path), "failed to find ld"));
} }