Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 4, 2025
1 parent 3b986eb commit 98aca25
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions martin/build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::fs;
use std::path::Path;
use std::{fs};

use walkdir::WalkDir;

Expand Down Expand Up @@ -29,7 +29,7 @@ fn copy_file_tree(src: &Path, dst: &Path, exclude_dirs: &[&str]) {
it.skip_current_dir();
continue;
}

// Get the relative path of the entry
let dst_path = dst.join(
entry
Expand All @@ -41,8 +41,8 @@ fn copy_file_tree(src: &Path, dst: &Path, exclude_dirs: &[&str]) {
// Tell Cargo to monitor all root level entries for changes
if dst_path.components().count() == 1 {
println!("cargo:rerun-if-changed={}", entry.path().display());
}
}

if entry.file_type().is_dir() {
fs::create_dir_all(&dst_path).unwrap_or_else(|e| {
panic!(
Expand Down

0 comments on commit 98aca25

Please sign in to comment.