Making CastToAny more generic.

This commit is contained in:
Tom Alexander 2020-05-10 22:05:48 -04:00
parent 9baa669dea
commit 2fb7ca9db7
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 1 additions and 7 deletions

View File

@ -48,7 +48,7 @@ impl<C: 'static + ContextElement + Clone> CloneIntoBoxedContextElement for C {
} }
} }
impl<C: 'static + ContextElement + PartialEq> CastToAny for C { impl<C: 'static + ContextElement> CastToAny for C {
fn to_any(&self) -> &dyn Any { fn to_any(&self) -> &dyn Any {
self self
} }

View File

@ -112,12 +112,6 @@ impl Clone for NewParametersContext {
} }
} }
impl CastToAny for NewParametersContext {
fn to_any(&self) -> &dyn Any {
self
}
}
impl CompareContextElement for NewParametersContext { impl CompareContextElement for NewParametersContext {
fn equals(&self, other: &dyn ContextElement) -> bool { fn equals(&self, other: &dyn ContextElement) -> bool {
// TODO: Does this ever happen? perhaps I should have a panic here. // TODO: Does this ever happen? perhaps I should have a panic here.