X-Git-Url: https://git.chrismorgan.info/anymap/blobdiff_plain/0850f5ec36b14904ae452ffdfa0a2ae0ba05c854..7866ca8d779805dc3a3134f2d247889a1721633c:/src/lib.rs diff --git a/src/lib.rs b/src/lib.rs index de03fb6..c9e0276 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -95,7 +95,7 @@ pub mod raw; /// be `anymap::any::Any`, but there are other choices: /// /// - If you want the entire map to be cloneable, use `CloneAny` instead of `Any`. -/// - You can add on `+ Send` and/or `+ Sync` (e.g. `Map`) to add those bounds. +/// - You can add on `+ Send` and/or `+ Sync` (e.g. `Map`) to add those bounds. /// /// ```rust /// # use anymap::AnyMap; @@ -120,7 +120,7 @@ pub mod raw; /// /// Values containing non-static references are not permitted. #[derive(Debug)] -pub struct Map { +pub struct Map { raw: RawMap, } @@ -139,7 +139,7 @@ impl Clone for Map where Box: Clone { /// Why is this a separate type alias rather than a default value for `Map`? `Map::new()` /// doesn’t seem to be happy to infer that it should go with the default value. /// It’s a bit sad, really. Ah well, I guess this approach will do. -pub type AnyMap = Map; +pub type AnyMap = Map; impl_common_methods! { field: Map.raw; @@ -394,7 +394,7 @@ mod tests { } test_entry!(test_entry_any, AnyMap); - test_entry!(test_entry_cloneany, Map); + test_entry!(test_entry_cloneany, Map); #[test] fn test_default() { @@ -404,7 +404,7 @@ mod tests { #[test] fn test_clone() { - let mut map: Map = Map::new(); + let mut map: Map = Map::new(); let _ = map.insert(A(1)); let _ = map.insert(B(2)); let _ = map.insert(D(3)); @@ -428,25 +428,25 @@ mod tests { fn assert_sync() { } fn assert_clone() { } fn assert_debug() { } - assert_send::>(); - assert_send::>(); - assert_sync::>(); - assert_sync::>(); - assert_debug::>(); - assert_debug::>(); - assert_debug::>(); - assert_debug::>(); - assert_send::>(); - assert_send::>(); - assert_sync::>(); - assert_sync::>(); - assert_clone::>(); - assert_clone::>(); - assert_clone::>(); - assert_clone::>(); - assert_debug::>(); - assert_debug::>(); - assert_debug::>(); - assert_debug::>(); + assert_send::>(); + assert_send::>(); + assert_sync::>(); + assert_sync::>(); + assert_debug::>(); + assert_debug::>(); + assert_debug::>(); + assert_debug::>(); + assert_send::>(); + assert_send::>(); + assert_sync::>(); + assert_sync::>(); + assert_clone::>(); + assert_clone::>(); + assert_clone::>(); + assert_clone::>(); + assert_debug::>(); + assert_debug::>(); + assert_debug::>(); + assert_debug::>(); } }