diff --git a/src/internals.rs b/src/internals.rs index f88d5bf..81ef9c5 100644 --- a/src/internals.rs +++ b/src/internals.rs @@ -26,30 +26,29 @@ unsafe impl UnsafeAnyExt for DebugAny + Send + Sync {} /// additional bounds. /// /// There is also an exported alias for this type of `TypeMap`, `CloneAny`. -pub trait CloneAny: Any { +pub trait CloneAny: Any + Send + Sync { #[doc(hidden)] fn clone_any(&self) -> Box; #[doc(hidden)] - fn clone_any_send(&self) -> Box where Self: Send; + fn clone_any_send(&self) -> Box; #[doc(hidden)] - fn clone_any_sync(&self) -> Box where Self: Sync; + fn clone_any_sync(&self) -> Box; #[doc(hidden)] - fn clone_any_send_sync(&self) -> Box where Self: Send + Sync; + fn clone_any_send_sync(&self) -> Box; } -impl CloneAny for T { +impl CloneAny for T { fn clone_any(&self) -> Box { Box::new(self.clone()) } - fn clone_any_send(&self) -> Box where Self: Send { + fn clone_any_send(&self) -> Box { Box::new(self.clone()) } - fn clone_any_sync(&self) -> Box where Self: Sync { + fn clone_any_sync(&self) -> Box { Box::new(self.clone()) } - fn clone_any_send_sync(&self) -> Box - where Self: Send + Sync { + fn clone_any_send_sync(&self) -> Box { Box::new(self.clone()) } }