perf: use rustc-hash for HashMap and HashSet
This commit is contained in:
parent
4dae45733e
commit
5369b4eb29
17 changed files with 46 additions and 26 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use std::collections::HashMap;
|
||||
use rustc_hash::FxHashMap;
|
||||
|
||||
use cosmic_config::{CosmicConfigEntry, cosmic_config_derive::CosmicConfigEntry};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
|
@ -8,13 +8,13 @@ use serde::{Deserialize, Serialize};
|
|||
#[serde(deny_unknown_fields)]
|
||||
pub struct CosmicPanelButtonConfig {
|
||||
/// configs indexed by panel name
|
||||
pub configs: HashMap<String, IndividualConfig>,
|
||||
pub configs: FxHashMap<String, IndividualConfig>,
|
||||
}
|
||||
|
||||
impl Default for CosmicPanelButtonConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
configs: HashMap::from([
|
||||
configs: FxHashMap::from_iter([
|
||||
(
|
||||
"Panel".to_string(),
|
||||
IndividualConfig {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue