diff --git a/crates/uv-resolver/src/lock/mod.rs b/crates/uv-resolver/src/lock/mod.rs index 51045b292..0505e5214 100644 --- a/crates/uv-resolver/src/lock/mod.rs +++ b/crates/uv-resolver/src/lock/mod.rs @@ -32,7 +32,7 @@ use uv_git::{GitReference, GitSha, RepositoryReference, ResolvedRepositoryRefere use uv_normalize::{ExtraName, GroupName, PackageName}; use uv_pep440::Version; use uv_pep508::{split_scheme, MarkerEnvironment, MarkerTree, VerbatimUrl, VerbatimUrlError}; -use uv_platform_tags::{TagCompatibility, TagPriority, Tags}; +use uv_platform_tags::{PlatformTag, TagCompatibility, TagPriority, Tags}; use uv_pypi_types::{ redact_credentials, ConflictPackage, Conflicts, HashDigest, ParsedArchiveUrl, ParsedGitUrl, Requirement, RequirementSource, @@ -292,19 +292,13 @@ impl Lock { // a single disjointness check with the intersection is sufficient, so we have one // constant per platform. let platform_tags = wheel.filename.platform_tags(); - if platform_tags - .iter() - .all(uv_platform_tags::PlatformTag::is_linux) - { + if platform_tags.iter().all(PlatformTag::is_linux) { if graph.graph[node_index].marker().is_disjoint(*LINUX_MARKERS) { return false; } } - if platform_tags - .iter() - .all(uv_platform_tags::PlatformTag::is_windows) - { + if platform_tags.iter().all(PlatformTag::is_windows) { // TODO(charlie): This omits `win_ia64`, which is accepted by Warehouse. if graph.graph[node_index] .marker() @@ -314,28 +308,19 @@ impl Lock { } } - if platform_tags - .iter() - .all(uv_platform_tags::PlatformTag::is_macos) - { + if platform_tags.iter().all(PlatformTag::is_macos) { if graph.graph[node_index].marker().is_disjoint(*MAC_MARKERS) { return false; } } - if platform_tags - .iter() - .all(uv_platform_tags::PlatformTag::is_arm) - { + if platform_tags.iter().all(PlatformTag::is_arm) { if graph.graph[node_index].marker().is_disjoint(*ARM_MARKERS) { return false; } } - if platform_tags - .iter() - .all(uv_platform_tags::PlatformTag::is_x86_64) - { + if platform_tags.iter().all(PlatformTag::is_x86_64) { if graph.graph[node_index] .marker() .is_disjoint(*X86_64_MARKERS) @@ -344,10 +329,7 @@ impl Lock { } } - if platform_tags - .iter() - .all(uv_platform_tags::PlatformTag::is_x86) - { + if platform_tags.iter().all(PlatformTag::is_x86) { if graph.graph[node_index].marker().is_disjoint(*X86_MARKERS) { return false; }