Change typemap_rev to git version and add insert_all to builder

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/34/head
trivernis 3 years ago
parent 5e239e1555
commit 6f19a63090
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

3
Cargo.lock generated

@ -1037,8 +1037,7 @@ dependencies = [
[[package]] [[package]]
name = "typemap_rev" name = "typemap_rev"
version = "0.1.5" version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://github.com/Trivernis/typemap_rev?rev=750c67bffe8024d2a47725daa473f068ad653fc4#750c67bffe8024d2a47725daa473f068ad653fc4"
checksum = "ed5b74f0a24b5454580a79abb6994393b09adf0ab8070f15827cb666255de155"
[[package]] [[package]]
name = "unicode-width" name = "unicode-width"

@ -23,7 +23,6 @@ harness = false
thiserror = "1.0.30" thiserror = "1.0.30"
tracing = "0.1.32" tracing = "0.1.32"
lazy_static = "1.4.0" lazy_static = "1.4.0"
typemap_rev = "0.1.5"
byteorder = "1.4.3" byteorder = "1.4.3"
async-trait = "0.1.52" async-trait = "0.1.52"
num_enum = "0.5.7" num_enum = "0.5.7"
@ -32,6 +31,11 @@ rmp-serde = { version = "1.0.0", optional = true }
bincode = { version = "1.3.3", optional = true } bincode = { version = "1.3.3", optional = true }
serde_json = { version = "1.0.79", optional = true } serde_json = { version = "1.0.79", optional = true }
[dependencies.typemap_rev]
version = "0.1.5"
git = "https://github.com/Trivernis/typemap_rev"
rev = "750c67bffe8024d2a47725daa473f068ad653fc4"
[dependencies.serde] [dependencies.serde]
optional = true optional = true
version = "1.0.136" version = "1.0.136"

@ -99,6 +99,13 @@ where
self self
} }
/// Adds all the data from the other given type map
pub fn insert_all(mut self, value: TypeMap) -> Self {
self.data.extend(value);
self
}
/// Adds an event callback /// Adds an event callback
pub fn on<F: 'static>(mut self, event: &str, callback: F) -> Self pub fn on<F: 'static>(mut self, event: &str, callback: F) -> Self
where where

Loading…
Cancel
Save