mirror of https://github.com/aya-rs/aya
aya-gen: fix clippy warnings
parent
0878c4505a
commit
1159741eda
@ -1,26 +1,22 @@
|
|||||||
use bindgen::{self, Builder, EnumVariation};
|
use bindgen::{self, Builder, EnumVariation};
|
||||||
|
|
||||||
pub fn user_builder() -> Builder {
|
pub fn user_builder() -> Builder {
|
||||||
let bindgen = bindgen::builder()
|
bindgen::builder()
|
||||||
.layout_tests(false)
|
.layout_tests(false)
|
||||||
.generate_comments(false)
|
.generate_comments(false)
|
||||||
.prepend_enum_name(false)
|
.prepend_enum_name(false)
|
||||||
.default_enum_style(EnumVariation::Rust {
|
.default_enum_style(EnumVariation::Rust {
|
||||||
non_exhaustive: false,
|
non_exhaustive: false,
|
||||||
});
|
})
|
||||||
|
|
||||||
bindgen
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn bpf_builder() -> Builder {
|
pub fn bpf_builder() -> Builder {
|
||||||
let bindgen = bindgen::builder()
|
bindgen::builder()
|
||||||
.use_core()
|
.use_core()
|
||||||
.ctypes_prefix("::aya_bpf_cty")
|
.ctypes_prefix("::aya_bpf_cty")
|
||||||
.layout_tests(false)
|
.layout_tests(false)
|
||||||
.generate_comments(false)
|
.generate_comments(false)
|
||||||
.clang_arg("-Wno-unknown-attributes")
|
.clang_arg("-Wno-unknown-attributes")
|
||||||
.default_enum_style(EnumVariation::ModuleConsts)
|
.default_enum_style(EnumVariation::ModuleConsts)
|
||||||
.prepend_enum_name(false);
|
.prepend_enum_name(false)
|
||||||
|
|
||||||
bindgen
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue