mirror of https://github.com/astral-sh/uv
Avoid cloning `String` in marker evaluation (#9598)
## Summary A small TODO that I found interesting. See: https://github.com/astral-sh/pubgrub/pull/35.
This commit is contained in:
parent
2e0223570d
commit
75949f3fec
|
|
@ -2683,7 +2683,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "pubgrub"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/astral-sh/pubgrub?rev=9cd9049a64c7352de2ff3b525b9ae36421b0cc18#9cd9049a64c7352de2ff3b525b9ae36421b0cc18"
|
||||
source = "git+https://github.com/astral-sh/pubgrub?rev=57832d0588fbb7aab824813481104761dc1c7740#57832d0588fbb7aab824813481104761dc1c7740"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"log",
|
||||
|
|
@ -5675,7 +5675,7 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
|
|||
[[package]]
|
||||
name = "version-ranges"
|
||||
version = "0.1.1"
|
||||
source = "git+https://github.com/astral-sh/pubgrub?rev=9cd9049a64c7352de2ff3b525b9ae36421b0cc18#9cd9049a64c7352de2ff3b525b9ae36421b0cc18"
|
||||
source = "git+https://github.com/astral-sh/pubgrub?rev=57832d0588fbb7aab824813481104761dc1c7740#57832d0588fbb7aab824813481104761dc1c7740"
|
||||
dependencies = [
|
||||
"smallvec",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ petgraph = { version = "0.6.5" }
|
|||
platform-info = { version = "2.0.3" }
|
||||
proc-macro2 = { version = "1.0.86" }
|
||||
procfs = { version = "0.17.0", default-features = false, features = ["flate2"] }
|
||||
pubgrub = { git = "https://github.com/astral-sh/pubgrub", rev = "9cd9049a64c7352de2ff3b525b9ae36421b0cc18" }
|
||||
pubgrub = { git = "https://github.com/astral-sh/pubgrub", rev = "57832d0588fbb7aab824813481104761dc1c7740" }
|
||||
quote = { version = "1.0.37" }
|
||||
rayon = { version = "1.10.0" }
|
||||
reflink-copy = { version = "0.1.19" }
|
||||
|
|
@ -175,7 +175,7 @@ unicode-width = { version = "0.1.13" }
|
|||
unscanny = { version = "0.1.0" }
|
||||
url = { version = "2.5.2", features = ["serde"] }
|
||||
urlencoding = { version = "2.1.3" }
|
||||
version-ranges = { git = "https://github.com/astral-sh/pubgrub", rev = "9cd9049a64c7352de2ff3b525b9ae36421b0cc18" }
|
||||
version-ranges = { git = "https://github.com/astral-sh/pubgrub", rev = "57832d0588fbb7aab824813481104761dc1c7740" }
|
||||
walkdir = { version = "2.5.0" }
|
||||
which = { version = "7.0.0", features = ["regex"] }
|
||||
windows-registry = { version = "0.3.0" }
|
||||
|
|
|
|||
|
|
@ -893,8 +893,6 @@ impl MarkerTree {
|
|||
}
|
||||
}
|
||||
|
||||
// todo(ibraheem): avoid cloning here, `contains` should accept `&impl Borrow<V>`
|
||||
let l_string = &l_string.to_string();
|
||||
if range.contains(l_string) {
|
||||
return tree.evaluate_reporter_impl(env, extras, reporter);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue