clippy: Fix latest nightly lints

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
pull/390/head
Dave Tucker 2 years ago
parent 98e25ca5e6
commit a8eef00595

@ -81,7 +81,7 @@ fn build_rust_ebpf(opts: &Options) -> anyhow::Result<()> {
fn get_libbpf_headers<P: AsRef<Path>>(libbpf_dir: P, include_path: P) -> anyhow::Result<()> { fn get_libbpf_headers<P: AsRef<Path>>(libbpf_dir: P, include_path: P) -> anyhow::Result<()> {
let dir = include_path.as_ref(); let dir = include_path.as_ref();
fs::create_dir_all(&dir)?; fs::create_dir_all(dir)?;
let status = Command::new("make") let status = Command::new("make")
.current_dir(libbpf_dir.as_ref().join("src")) .current_dir(libbpf_dir.as_ref().join("src"))
.arg(format!("INCLUDEDIR={}", dir.as_os_str().to_string_lossy())) .arg(format!("INCLUDEDIR={}", dir.as_os_str().to_string_lossy()))

@ -55,7 +55,7 @@ pub fn docs() -> Result<(), anyhow::Error> {
fn build_docs(working_dir: &PathBuf, abs_header_path: &Path) -> Result<(), anyhow::Error> { fn build_docs(working_dir: &PathBuf, abs_header_path: &Path) -> Result<(), anyhow::Error> {
let replace = Command::new("sed") let replace = Command::new("sed")
.current_dir(&working_dir) .current_dir(working_dir)
.args(vec!["-i.bak", "s/crabby.svg/crabby_dev.svg/", "src/lib.rs"]) .args(vec!["-i.bak", "s/crabby.svg/crabby_dev.svg/", "src/lib.rs"])
.status() .status()
.expect("failed to replace logo"); .expect("failed to replace logo");
@ -64,7 +64,7 @@ fn build_docs(working_dir: &PathBuf, abs_header_path: &Path) -> Result<(), anyho
let args = vec!["+nightly", "doc", "--no-deps", "--all-features"]; let args = vec!["+nightly", "doc", "--no-deps", "--all-features"];
let status = Command::new("cargo") let status = Command::new("cargo")
.current_dir(&working_dir) .current_dir(working_dir)
.env( .env(
"RUSTDOCFLAGS", "RUSTDOCFLAGS",
format!("--html-in-header {}", abs_header_path.to_str().unwrap()), format!("--html-in-header {}", abs_header_path.to_str().unwrap()),

Loading…
Cancel
Save