Revert "Use Fx* variants of HashMap and HashSet everywhere in Zed" (#7492)

Reverts zed-industries/zed#7481

This would regress performance because we'd be using the standard
library's hash maps everywhere, so reverting for now.
This commit is contained in:
Antonio Scandurra 2024-02-07 13:16:22 +01:00 committed by GitHub
parent 5c8073d344
commit 55129d4d6c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 102 additions and 96 deletions

View file

@ -8,7 +8,11 @@ license = "GPL-3.0-or-later"
[features]
default = []
stories = ["dep:itertools", "dep:story"]
test-support = ["gpui/test-support", "fs/test-support", "settings/test-support"]
test-support = [
"gpui/test-support",
"fs/test-support",
"settings/test-support"
]
[lib]
path = "src/theme.rs"
@ -16,7 +20,6 @@ doctest = false
[dependencies]
anyhow.workspace = true
collections.workspace = true
color.workspace = true
derive_more.workspace = true
fs.workspace = true

View file

@ -1,8 +1,8 @@
use std::collections::HashMap;
use std::path::Path;
use std::sync::Arc;
use anyhow::{anyhow, Context, Result};
use collections::HashMap;
use derive_more::{Deref, DerefMut};
use fs::Fs;
use futures::StreamExt;
@ -64,7 +64,7 @@ impl ThemeRegistry {
pub fn new(assets: Box<dyn AssetSource>) -> Self {
let registry = Self {
state: RwLock::new(ThemeRegistryState {
themes: HashMap::default(),
themes: HashMap::new(),
}),
assets,
};