mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-17 13:58:29 +00:00
additional use of Self, remove * and & where not needed (#15091)
continuation of #15074.
This commit is contained in:
parent
bda9ea957a
commit
3d3856ffd5
14 changed files with 71 additions and 71 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue