Remove unnecessary `.to_string()` call (#10419)

This commit is contained in:
Charlie Marsh 2025-01-08 18:59:13 -05:00 committed by GitHub
parent f65fcf23b3
commit 5551f9f3da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -83,11 +83,11 @@ impl Tags {
pub fn new(tags: Vec<(String, String, String)>) -> Self {
let mut map = FxHashMap::default();
for (index, (py, abi, platform)) in tags.into_iter().rev().enumerate() {
map.entry(py.to_string())
map.entry(py)
.or_insert(FxHashMap::default())
.entry(abi.to_string())
.entry(abi)
.or_insert(FxHashMap::default())
.entry(platform.to_string())
.entry(platform)
.or_insert(TagPriority::try_from(index).expect("valid tag priority"));
}
Self { map: Arc::new(map) }