Use FnvHashMap
for Data
This commit is contained in:
parent
d501f73a08
commit
9d294708e1
|
@ -40,6 +40,7 @@ tempdir = "0.3.7"
|
|||
httparse = "1.3.4"
|
||||
mime = "0.3.16"
|
||||
http = "0.2.1"
|
||||
fnv = "1.0.6"
|
||||
regex = { version = "1.3.5", optional = true }
|
||||
bson = { version = "0.14.1", optional = true }
|
||||
uuid = { version = "0.8.1", optional = true }
|
||||
|
|
|
@ -10,6 +10,7 @@ use std::ops::{Deref, DerefMut};
|
|||
use std::path::Path;
|
||||
use std::sync::atomic::AtomicUsize;
|
||||
use std::sync::Arc;
|
||||
use fnv::FnvHashMap;
|
||||
|
||||
/// Variables of query
|
||||
#[derive(Debug, Clone)]
|
||||
|
@ -130,7 +131,7 @@ fn json_value_to_gql_value(value: serde_json::Value) -> Value {
|
|||
|
||||
#[derive(Default)]
|
||||
/// Schema/Context data
|
||||
pub struct Data(BTreeMap<TypeId, Box<dyn Any + Sync + Send>>);
|
||||
pub struct Data(FnvHashMap<TypeId, Box<dyn Any + Sync + Send>>);
|
||||
|
||||
impl Data {
|
||||
#[allow(missing_docs)]
|
||||
|
|
Loading…
Reference in New Issue
Block a user