xtask: clippy warnings

pull/29/head
Alessandro Decina 3 years ago
parent 5dfd27dbd0
commit 2d16843d5d

@ -49,10 +49,7 @@ fn codegen_internal_btf_bindings(opts: &Options) -> Result<(), anyhow::Error> {
.to_string(); .to_string();
// write the bindings, with the original helpers removed // write the bindings, with the original helpers removed
write_to_file( write_to_file(&generated.join("btf_internal_bindings.rs"), &bindings)?;
&generated.join("btf_internal_bindings.rs"),
&bindings.to_string(),
)?;
Ok(()) Ok(())
} }

@ -60,11 +60,11 @@ pub fn expand_helpers(helpers: &[Helper<'_>]) -> TokenStream {
tokens.append_all( tokens.append_all(
helpers helpers
.iter() .iter()
.filter(|h| h.ident.to_string() != "bpf_trace_printk") .filter(|h| *h.ident != "bpf_trace_printk")
.map(expand_helper), .map(expand_helper),
); );
return tokens; tokens
} }
pub fn expand_helper(helper: &Helper<'_>) -> TokenStream { pub fn expand_helper(helper: &Helper<'_>) -> TokenStream {

@ -6,7 +6,7 @@ use std::path::PathBuf;
use structopt::StructOpt; use structopt::StructOpt;
const SUPPORTED_ARCHS: &'static [Architecture] = &[ const SUPPORTED_ARCHS: &[Architecture] = &[
Architecture::X86_64, Architecture::X86_64,
Architecture::ARMv7, Architecture::ARMv7,
Architecture::AArch64, Architecture::AArch64,

Loading…
Cancel
Save