additional use of Self, remove * and & where not needed (#15091)

continuation of #15074.
This commit is contained in:
adamnemecek 2025-08-05 13:19:56 -07:00 committed by GitHub
parent bda9ea957a
commit 3d3856ffd5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 71 additions and 71 deletions

View file

@ -51,7 +51,7 @@ impl Reinstall {
/// Returns `true` if the specified package should be reinstalled.
pub fn contains_package(&self, package_name: &PackageName) -> bool {
match &self {
match self {
Self::None => false,
Self::All => true,
Self::Packages(packages, ..) => packages.contains(package_name),
@ -60,7 +60,7 @@ impl Reinstall {
/// Returns `true` if the specified path should be reinstalled.
pub fn contains_path(&self, path: &Path) -> bool {
match &self {
match self {
Self::None => false,
Self::All => true,
Self::Packages(.., paths) => paths
@ -194,7 +194,7 @@ impl Upgrade {
/// Returns `true` if the specified package should be upgraded.
pub fn contains(&self, package_name: &PackageName) -> bool {
match &self {
match self {
Self::None => false,
Self::All => true,
Self::Packages(packages) => packages.contains_key(package_name),