Skip to content

Commit

Permalink
vmm: build: Resolve clippy warnings
Browse files Browse the repository at this point in the history
Clippy warns to use &Path instead of &PathBuf and no need to pass
&format!() when format!() does just fine.

Signed-off-by: Elliot Berman <[email protected]>
  • Loading branch information
eberman-quic committed Dec 17, 2024
1 parent dd842a2 commit 727c573
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions vmm/build.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
// Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved.
// SPDX-License-Identifier: BSD-3-Clause-Clear

use std::{env, io::stderr, path::PathBuf, process::Command};
use std::{
env,
io::stderr,
path::{Path, PathBuf},
process::Command,
};

const HOLDING_CELL_SOURCES: [&str; 3] = [
"tests/holding_cell/holding-cell.c",
"tests/holding_cell/holding-cell-mmu.S",
"tests/holding_cell/holding-cell-vtable.S",
];

fn build_unsafe_read(out_dir: &PathBuf) {
fn build_unsafe_read(out_dir: &Path) {
println!("cargo::rerun-if-changed=src/unsafe_read.c");
cc::Build::new()
.file("src/unsafe_read.c")
Expand Down Expand Up @@ -64,8 +69,8 @@ fn main() {

assert!(Command::new(objcopy)
.args(["-O", "binary"])
.arg(&format!("{}/holding-cell.elf", &out_dir))
.arg(&format!("{}/holding-cell.bin", &out_dir))
.arg(format!("{}/holding-cell.elf", &out_dir))
.arg(format!("{}/holding-cell.bin", &out_dir))
.stderr(stderr())
.status()
.unwrap()
Expand Down

0 comments on commit 727c573

Please sign in to comment.