From 2fb7ca9db730d4c4b41edebf022ef5e844c330b4 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sun, 10 May 2020 22:05:48 -0400 Subject: [PATCH] Making CastToAny more generic. --- src/renderer/context_element.rs | 2 +- src/renderer/parameters_context.rs | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/renderer/context_element.rs b/src/renderer/context_element.rs index 8701711..0b1c304 100644 --- a/src/renderer/context_element.rs +++ b/src/renderer/context_element.rs @@ -48,7 +48,7 @@ impl CloneIntoBoxedContextElement for C { } } -impl CastToAny for C { +impl CastToAny for C { fn to_any(&self) -> &dyn Any { self } diff --git a/src/renderer/parameters_context.rs b/src/renderer/parameters_context.rs index 6d525ca..af08de0 100644 --- a/src/renderer/parameters_context.rs +++ b/src/renderer/parameters_context.rs @@ -112,12 +112,6 @@ impl Clone for NewParametersContext { } } -impl CastToAny for NewParametersContext { - fn to_any(&self) -> &dyn Any { - self - } -} - impl CompareContextElement for NewParametersContext { fn equals(&self, other: &dyn ContextElement) -> bool { // TODO: Does this ever happen? perhaps I should have a panic here.