Refactor to avoid a spurious compatibility warning
[anymap] / src / raw.rs
index 17c3869c9153be5d559d1610829fe5db853aca1c..aa3d6dc7dd83b1d3e159339c5abd5c2abdee86d2 100644 (file)
@@ -56,7 +56,7 @@ fn type_id_hasher() {
 /// contents of an `Map`. However, because you will then be dealing with `Any` trait objects, it
 /// doesn’t tend to be so very useful. Still, if you need it, it’s here.
 #[derive(Debug)]
-pub struct RawMap<A: ?Sized + UncheckedAnyExt = Any> {
+pub struct RawMap<A: ?Sized + UncheckedAnyExt = dyn Any> {
     inner: HashMap<TypeId, Box<A>, BuildHasherDefault<TypeIdHasher>>,
 }
 
@@ -70,13 +70,6 @@ impl<A: ?Sized + UncheckedAnyExt> Clone for RawMap<A> where Box<A>: Clone {
     }
 }
 
-impl<A: ?Sized + UncheckedAnyExt> Default for RawMap<A> {
-    #[inline]
-    fn default() -> RawMap<A> {
-        RawMap::new()
-    }
-}
-
 impl_common_methods! {
     field: RawMap.inner;
     new() => HashMap::with_hasher(Default::default());