diff --git a/Cargo.toml b/Cargo.toml index 7293486..653ca6d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "trait-bound-typemap" -version = "0.2.0" +version = "0.3.0" edition = "2021" license = "Apache-2.0" readme = "README.md" diff --git a/README.md b/README.md index 3896abf..fe19bc8 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ fat pointer used by trait objects changes which it hasn't in a long time so far. ## Usage ```rust -use trait_bound_typemap::{CloneTypeMap, AnyTypeMap, TypeMapTrait, TypeMapKey}; +use trait_bound_typemap::{CloneTypeMap, AnyTypeMap, TypeMap, TypeMapKey}; #[derive(Clone)] pub struct MyStruct { diff --git a/src/macros.rs b/src/macros.rs index 7bbd1a3..2c3ae05 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -14,7 +14,7 @@ macro_rules! impl_typemap { type Map = $map; } - impl $crate::TypeMapTrait for $map { + impl $crate::TypeMap for $map { type Key = $key; #[inline] diff --git a/src/tests.rs b/src/tests.rs index 0bb2235..e2ea714 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -1,5 +1,5 @@ use crate::{ - AnyTypeMap, CloneSendSyncTypeMap, CloneTypeMap, PartialEqTypeMap, TypeMapKey, TypeMapTrait, + AnyTypeMap, CloneSendSyncTypeMap, CloneTypeMap, PartialEqTypeMap, TypeMap, TypeMapKey, }; pub struct TestStructKey; diff --git a/src/typemap_trait.rs b/src/typemap_trait.rs index 43f60a8..7023f32 100644 --- a/src/typemap_trait.rs +++ b/src/typemap_trait.rs @@ -24,12 +24,12 @@ pub trait TypedKeyMto { /// A trait to map the key to the map it describes #[doc(hidden)] pub trait MapKey { - type Map: TypeMapTrait; + type Map: TypeMap; } /// A trait implemented by all typemaps that provides /// all basic typemap functions -pub trait TypeMapTrait { +pub trait TypeMap { type Key; /// Creates a new typemap