Skip to content

Commit

Permalink
Remove redundant AsAny
Browse files Browse the repository at this point in the history
  • Loading branch information
kmicklas committed Jun 17, 2024
1 parent 29873b5 commit 94f0033
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions ravel-web/src/any.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,6 @@ use crate::{
BuildCx, Builder, RebuildCx, View, ViewMarker, Web,
};

/// Trait for upcasting to [`Any`], implemented automatically.
///
/// This is a workaround until `trait_upcasting` is stabilized.
pub trait AsAny: Any {
fn as_mut_dyn_any(&mut self) -> &mut dyn Any;
}

impl<T: Any> AsAny for T {
fn as_mut_dyn_any(&mut self) -> &mut dyn Any {
self
}
}

/// A wrapper around a [`trait@View`], erasing its [`State`] type.
pub struct AnyView<V: View, Output> {
inner: V,
Expand Down

0 comments on commit 94f0033

Please sign in to comment.