Switched to hashbrown everywhere

This commit is contained in:
jiminycrick 2020-12-11 17:45:46 -08:00 committed by Marcel Märtens
parent 52c37e1de0
commit 60d5d62eef
11 changed files with 22 additions and 19 deletions

View File

@ -1,7 +1,7 @@
use crate::{assets, comp, npc, terrain};
use hashbrown::HashMap;
use lazy_static::lazy_static;
use std::{
collections::HashMap,
fmt::{self, Display},
path::Path,
str::FromStr,

View File

@ -1,8 +1,9 @@
use crate::uid::Uid;
use hashbrown::HashMap;
use serde::{Deserialize, Serialize};
use specs::{Component, FlaggedStorage};
use specs_idvs::IdvStorage;
use std::{cmp::Ordering, collections::HashMap, time::Duration};
use std::{cmp::Ordering, time::Duration};
/// De/buff Kind.
/// This is used to determine what effects a buff will have

View File

@ -5,8 +5,9 @@ use crate::{
assets::{self, Asset},
comp::CharacterAbility,
};
use hashbrown::HashMap;
use serde::{Deserialize, Serialize};
use std::{collections::HashMap, fs::File, io::BufReader, time::Duration};
use std::{fs::File, io::BufReader, time::Duration};
use tracing::error;
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]

View File

@ -1,9 +1,7 @@
use hashbrown::{HashMap, HashSet};
use lazy_static::lazy_static;
use serde::{Deserialize, Serialize};
use std::{
collections::{HashMap, HashSet},
hash::Hash,
};
use std::hash::Hash;
use tracing::warn;
lazy_static! {

View File

@ -1,11 +1,12 @@
use super::SpriteKind;
use crate::make_case_elim;
use enum_iterator::IntoEnumIterator;
use hashbrown::HashMap;
use lazy_static::lazy_static;
use num_derive::FromPrimitive;
use num_traits::FromPrimitive;
use serde::{Deserialize, Serialize};
use std::{collections::HashMap, convert::TryFrom, fmt, ops::Deref};
use std::{convert::TryFrom, fmt, ops::Deref};
use vek::*;
make_case_elim!(

View File

@ -1,9 +1,10 @@
use crate::make_case_elim;
use enum_iterator::IntoEnumIterator;
use hashbrown::HashMap;
use lazy_static::lazy_static;
use num_derive::FromPrimitive;
use serde::{Deserialize, Serialize};
use std::{collections::HashMap, convert::TryFrom, fmt};
use std::{convert::TryFrom, fmt};
make_case_elim!(
sprite_kind,

View File

@ -1,10 +1,11 @@
use hashbrown::HashMap;
use serde::{Deserialize, Serialize};
use specs::{
saveload::{Marker, MarkerAllocator},
world::EntitiesRes,
Component, Entity, FlaggedStorage, Join, ReadStorage, VecStorage,
};
use std::{collections::HashMap, fmt, u64};
use std::{fmt, u64};
#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
pub struct Uid(pub u64);

View File

@ -1,3 +1,4 @@
use hashbrown::HashSet;
use lazy_static::lazy_static;
use libloading::Library;
use notify::{immediate_watcher, EventKind, RecursiveMode, Watcher};
@ -147,7 +148,7 @@ pub fn init() {
// "Debounces" events since I can't find the option to do this in the latest
// `notify`
thread::spawn(move || {
let mut modified_paths = std::collections::HashSet::new();
let mut modified_paths = HashSet::new();
while let Ok(path) = reload_recv.recv() {
modified_paths.insert(path);

View File

@ -73,9 +73,10 @@ use conrod_core::{
widget::{self, Button, Image, Text},
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget,
};
use hashbrown::HashMap;
use specs::{Join, WorldExt};
use std::{
collections::{HashMap, VecDeque},
collections::VecDeque,
sync::Arc,
time::{Duration, Instant},
};

View File

@ -1,12 +1,9 @@
use common::assets::{self, Asset};
use deunicode::deunicode;
use hashbrown::{HashMap, HashSet};
use ron::de::from_reader;
use serde::{Deserialize, Serialize};
use std::{
collections::{HashMap, HashSet},
fs::File,
io::BufReader,
};
use std::{fs::File, io::BufReader};
use tracing::warn;
/// The reference language, aka the more up-to-date localization data.
@ -177,9 +174,9 @@ pub fn i18n_asset_key(language_id: &str) -> String { "voxygen.i18n.".to_string()
mod tests {
use super::Localization;
use git2::Repository;
use hashbrown::{HashMap, HashSet};
use ron::de::{from_bytes, from_reader};
use std::{
collections::{HashMap, HashSet},
fs,
path::{Path, PathBuf},
};

View File

@ -9,8 +9,9 @@ use common::{
terrain::{structure::Structure, Block, BlockKind},
vol::ReadVol,
};
use hashbrown::HashMap;
use lazy_static::lazy_static;
use std::{collections::HashMap, f32, sync::Arc};
use std::{f32, sync::Arc};
use vek::*;
lazy_static! {