diff --git a/crates/core/src/limiter.rs b/crates/core/src/limiter.rs index 7e74b65e73..699b3bca16 100644 --- a/crates/core/src/limiter.rs +++ b/crates/core/src/limiter.rs @@ -164,7 +164,7 @@ pub trait ResourceLimiter { /// This type exists both to make types a little easier to read and to provide /// a `Debug` impl so that `#[derive(Debug)]` works on structs that contain it. #[derive(Default)] -pub struct ResourceLimiterRef<'a>(Option<&'a mut (dyn ResourceLimiter)>); +pub struct ResourceLimiterRef<'a>(Option<&'a mut dyn ResourceLimiter>); impl Debug for ResourceLimiterRef<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { diff --git a/crates/core/src/trap.rs b/crates/core/src/trap.rs index f15457971d..2a6580ed10 100644 --- a/crates/core/src/trap.rs +++ b/crates/core/src/trap.rs @@ -117,7 +117,7 @@ impl Trap { { self.reason .as_host() - .and_then(<(dyn HostError + 'static)>::downcast_ref) + .and_then(::downcast_ref) } /// Downcasts the [`Trap`] into the `T: HostError` if possible. @@ -130,7 +130,7 @@ impl Trap { { self.reason .as_host_mut() - .and_then(<(dyn HostError + 'static)>::downcast_mut) + .and_then(::downcast_mut) } /// Consumes `self` to downcast the [`Trap`] into the `T: HostError` if possible.