Skip to content

Commit

Permalink
style: Clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioGasquez committed Apr 8, 2024
1 parent ba7856e commit aaab769
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions xtask/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,8 @@ pub fn generate_efuse_table(
// Determine the commit (short) hash of the HEAD commit in the
// provided ESP-IDF repository:
let output = Command::new("git")
.args(&["rev-parse", "HEAD"])
.current_dir(&idf_path)
.args(["rev-parse", "HEAD"])
.current_dir(idf_path)
.output()?;
let idf_hash = String::from_utf8_lossy(&output.stdout[0..=7]).to_string();

Expand Down
11 changes: 4 additions & 7 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ fn build_documentation(workspace: &Path, args: BuildDocumentationArgs) -> Result
let resources = workspace.join("resources");

let package = args.package.to_string();
let version = xtask::package_version(&workspace, args.package)?;
let version = xtask::package_version(workspace, args.package)?;

let mut crates = Vec::new();

Expand Down Expand Up @@ -188,10 +188,7 @@ fn build_documentation(workspace: &Path, args: BuildDocumentationArgs) -> Result
}

// Copy any additional assets to the documentation's output path:
fs::copy(
&resources.join("esp-rs.svg"),
&output_path.join("esp-rs.svg"),
)?;
fs::copy(resources.join("esp-rs.svg"), output_path.join("esp-rs.svg"))?;

// Render the index and write it out to the documentaiton's output path:
let source = fs::read_to_string(resources.join("index.html.jinja"))?;
Expand Down Expand Up @@ -280,7 +277,7 @@ fn generate_efuse_src(workspace: &Path, args: GenerateEfuseFieldsArgs) -> Result

// Generate the Rust source file from the CSV file, and write it out to
// the appropriate path:
xtask::generate_efuse_table(&args.chip, &idf_path, out_path)?;
xtask::generate_efuse_table(&args.chip, idf_path, out_path)?;

// Format the generated code:
xtask::cargo::run(&["fmt".into()], &esp_hal)?;
Expand Down Expand Up @@ -337,7 +334,7 @@ fn run_example(workspace: &Path, mut args: RunExampleArgs) -> Result<()> {
Ok(())
}

fn run_tests(workspace: &PathBuf, args: RunTestsArgs) -> Result<(), anyhow::Error> {
fn run_tests(workspace: &Path, args: RunTestsArgs) -> Result<(), anyhow::Error> {
// Absolute path of the package's root:
let package_path = xtask::windows_safe_path(&workspace.join("hil-test"));

Expand Down

0 comments on commit aaab769

Please sign in to comment.