Skip to content

Commit

Permalink
fix: needless borrow on actions and paket modules
Browse files Browse the repository at this point in the history
  • Loading branch information
joseluisq committed Nov 6, 2022
1 parent e2cf0db commit 81ce386
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/cli/actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl<'a> Actions<'a> {
// Clone the remote repository
self.git.clone(pkg_name, pkg_tag, git_provider)?;

let pkg_dir = self.git.base_dir.join(&pkg_name);
let pkg_dir = self.git.base_dir.join(pkg_name);
if !self.paket.pkg_exists(pkg_name) {
bail!("package `{}` was not cloned with success.", pkg_name);
}
Expand Down Expand Up @@ -120,7 +120,7 @@ impl<'a> Actions<'a> {

self.git
.base_dir
.join(&pkg_name)
.join(pkg_name)
.canonicalize()
.with_context(|| format!("package `{}` was not updated properly.", pkg_name))?
};
Expand Down Expand Up @@ -172,7 +172,7 @@ impl<'a> Actions<'a> {
println!("Uninstalling package `{}`...", &pkg_name);

// Process Fish shell package structure
let pkg_dir = self.git.base_dir.join(&pkg_name);
let pkg_dir = self.git.base_dir.join(pkg_name);
if !self.paket.pkg_exists(pkg_name) {
bail!(
"package `{}` is not installed or was already removed.",
Expand Down
2 changes: 1 addition & 1 deletion src/paket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ impl<'a> Paket {

// Check for files with allowed directory parents
if let Some(parent) = path.parent() {
if !helper_file::has_path_any_suffixes(&parent, &path_suffixes) {
if !helper_file::has_path_any_suffixes(parent, &path_suffixes) {
continue;
}

Expand Down

0 comments on commit 81ce386

Please sign in to comment.