Skip to content

Commit

Permalink
chore: fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
amr-crabnebula committed Sep 12, 2023
1 parent 3ba4d01 commit 5025177
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions crates/packager/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl ConfigExt for Config {
} else if target.starts_with("universal") {
"universal"
} else {
return Err(crate::Error::UnexpectedTargetTriple(target.clone()));
return Err(crate::Error::UnexpectedTargetTriple(target));
})
}

Expand Down Expand Up @@ -127,16 +127,16 @@ impl ConfigExtInternal for Config {
#[inline]
fn create_resources_from_dir(
src: &PathBuf,
target: &PathBuf,
target: &Path,
) -> crate::Result<Vec<IResource>> {
let mut out = Vec::new();
for entry in walkdir::WalkDir::new(&src) {
for entry in walkdir::WalkDir::new(src) {
let entry = entry?;
let path = entry.path();
if path.is_file() {
let relative = path.relative_to(&src)?.to_path("");
let relative = path.relative_to(src)?.to_path("");
let resource = IResource {
src: dunce::canonicalize(path.to_path_buf())?,
src: dunce::canonicalize(path)?,
target: target.join(relative),
};
out.push(resource);
Expand All @@ -156,7 +156,7 @@ impl ConfigExtInternal for Config {
for src in glob::glob(src).unwrap() {
let src = src?;
let src = dunce::canonicalize(src)?;
let target = src.relative_to(&cwd)?;
let target = src.relative_to(cwd)?;
out.push(IResource {
src,
target: target.to_path(""),
Expand Down

0 comments on commit 5025177

Please sign in to comment.