Skip to content

Commit

Permalink
rectify some previously dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
glendc committed May 6, 2024
1 parent e378955 commit f5f226e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions src/service/context/extensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ impl fmt::Debug for Extensions {
trait AnyClone: Any {
fn clone_box(&self) -> Box<dyn AnyClone + Send + Sync>;
fn as_any(&self) -> &dyn Any;
fn as_any_mut(&mut self) -> &mut dyn Any;
fn into_any(self: Box<Self>) -> Box<dyn Any>;
}

Expand All @@ -153,10 +152,6 @@ impl<T: Clone + Send + Sync + 'static> AnyClone for T {
self
}

fn as_any_mut(&mut self) -> &mut dyn Any {
self
}

fn into_any(self: Box<Self>) -> Box<dyn Any> {
self
}
Expand Down
4 changes: 2 additions & 2 deletions src/service/layer/into_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/// Utility error trait to allow Rama layers
/// to return a default error as well as a user-defined one,
/// being it a [`Clone`]-able type or a [`Fn`] returning an error type.
pub trait MakeLayerError: Send + Sync + 'static {
pub trait MakeLayerError: sealed::Sealed + Send + Sync + 'static {
/// The error type returned by the layer.
///
/// It does not need to be an actual error type,
Expand Down Expand Up @@ -81,7 +81,7 @@ where
}

mod sealed {
pub(super) trait Sealed {}
pub trait Sealed {}

impl<F> Sealed for super::LayerErrorFn<F> {}
impl<E> Sealed for super::LayerErrorStatic<E> {}
Expand Down

0 comments on commit f5f226e

Please sign in to comment.