Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ byteorder = "1"
clean-path = "0.2.1"
concurrent_lru = "^0.2"
fancy-regex = { version = "^0.14.0", default-features = false, features = ["std"] }
indexmap = { version = "2", default-features = true, features = ["serde"] }
miniz_oxide = "^0.8"
mmap-rs = { version = "^0.6", optional = true }
path-slash = "0.2.1"
Expand Down
16 changes: 5 additions & 11 deletions src/manifest.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::{hash::BuildHasherDefault, path::PathBuf};
use std::path::PathBuf;

use indexmap::IndexMap;
use rustc_hash::{FxHashMap, FxHashSet, FxHasher};
use rustc_hash::{FxHashMap, FxHashSet};
use serde::{Deserialize, de::Deserializer};

use crate::util::{RegexDef, Trie};
Expand Down Expand Up @@ -49,8 +48,7 @@ pub struct Manifest {
// }]
// ]
#[serde(deserialize_with = "deserialize_package_registry_data")]
pub package_registry_data:
FxHashMap<String, IndexMap<String, PackageInformation, BuildHasherDefault<FxHasher>>>,
pub package_registry_data: FxHashMap<String, FxHashMap<String, PackageInformation>>,
}

#[derive(Clone, Debug, Default, Eq, PartialEq, Hash, Deserialize)]
Expand Down Expand Up @@ -110,13 +108,9 @@ where
Ok(map)
}

#[expect(clippy::type_complexity)]
fn deserialize_package_registry_data<'de, D>(
deserializer: D,
) -> Result<
FxHashMap<String, IndexMap<String, PackageInformation, BuildHasherDefault<FxHasher>>>,
D::Error,
>
) -> Result<FxHashMap<String, FxHashMap<String, PackageInformation>>, D::Error>
where
D: Deserializer<'de>,
{
Expand All @@ -126,7 +120,7 @@ where
let mut map = FxHashMap::default();
for item in Vec::<Item>::deserialize(deserializer)? {
let key = item.0.unwrap_or_else(|| "".to_string());
let value = IndexMap::from_iter(
let value = FxHashMap::from_iter(
item.1.into_iter().map(|(k, v)| (k.unwrap_or_else(|| "".to_string()), v)),
);
map.insert(key, value);
Expand Down