mirror of https://github.com/aya-rs/aya
bpf: fix some clippy warnings
parent
1159741eda
commit
5dfd27dbd0
@ -1,9 +1,9 @@
|
|||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
if !env::var("CARGO_CFG_BPF_TARGET_ARCH").is_ok() {
|
if env::var("CARGO_CFG_BPF_TARGET_ARCH").is_err() {
|
||||||
let arch = env::var("HOST").unwrap();
|
let arch = env::var("HOST").unwrap();
|
||||||
let arch = arch.splitn(2, "-").next().unwrap();
|
let arch = arch.splitn(2, '-').next().unwrap();
|
||||||
println!("cargo:rustc-cfg=bpf_target_arch=\"{}\"", arch);
|
println!("cargo:rustc-cfg=bpf_target_arch=\"{}\"", arch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
if !env::var("CARGO_CFG_BPF_TARGET_ARCH").is_ok() {
|
if env::var("CARGO_CFG_BPF_TARGET_ARCH").is_err() {
|
||||||
let arch = env::var("HOST").unwrap();
|
let arch = env::var("HOST").unwrap();
|
||||||
let arch = arch.splitn(2, "-").next().unwrap();
|
let arch = arch.splitn(2, '-').next().unwrap();
|
||||||
println!("cargo:rustc-cfg=bpf_target_arch=\"{}\"", arch);
|
println!("cargo:rustc-cfg=bpf_target_arch=\"{}\"", arch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue