From 26da6abd2256c65f1eea4388978a2e63a3f2eff0 Mon Sep 17 00:00:00 2001 From: daimond113 <72147841+daimond113@users.noreply.github.com> Date: Wed, 27 Mar 2024 00:48:00 +0100 Subject: [PATCH] style: :art: apply clippy & rustfmt --- src/dependencies/resolution.rs | 5 ++--- src/linking_file.rs | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/dependencies/resolution.rs b/src/dependencies/resolution.rs index 54d6f7d..7a6c1cb 100644 --- a/src/dependencies/resolution.rs +++ b/src/dependencies/resolution.rs @@ -515,9 +515,8 @@ impl Manifest { for (specifier, ty) in dependencies { let overridden = overrides.iter().find_map(|(k_path, spec)| { - (&path == &k_path[..k_path.len() - 1] - && k_path.get(k_path.len() - 1) == Some(&specifier.name())) - .then_some(spec) + (path == k_path[..k_path.len() - 1] && k_path.last() == Some(&specifier.name())) + .then_some(spec) }); queue.push_back(( diff --git a/src/linking_file.rs b/src/linking_file.rs index ffe87bc..58a1d06 100644 --- a/src/linking_file.rs +++ b/src/linking_file.rs @@ -298,7 +298,9 @@ impl Project { if root_deps.contains(&name) { let specifier = lockfile.root_specifier(resolved_pkg).unwrap(); - let linking_dir = &self.path().join(packages_folder(specifier.realm().copied().unwrap_or_default())); + let linking_dir = &self.path().join(packages_folder( + specifier.realm().copied().unwrap_or_default(), + )); debug!( "linking root package {name}@{version} to directory {}",