Skip to content

Commit

Permalink
Move __T bound into type param so clippy doesn't warn.
Browse files Browse the repository at this point in the history
  • Loading branch information
azriel91 authored and marcianx committed Mar 16, 2024
1 parent ad1edbf commit 9b1eb58
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,9 @@ macro_rules! impl_downcast {
/// Returns an `Arc`-ed object from an `Arc`-ed trait object if the underlying object is of
/// type `__T`. Returns the original `Arc`-ed trait if it isn't.
#[inline]
pub fn downcast_arc<__T: $trait_<$($types)*>>(
pub fn downcast_arc<__T: $trait_<$($types)*> + $crate::__std::any::Any + $crate::__std::marker::Send + $crate::__std::marker::Sync>(
self: $crate::__alloc::sync::Arc<Self>,
) -> $crate::__std::result::Result<$crate::__alloc::sync::Arc<__T>, $crate::__alloc::sync::Arc<Self>>
where __T: $crate::__std::any::Any + $crate::__std::marker::Send + $crate::__std::marker::Sync
{
if self.is::<__T>() {
Ok($crate::DowncastSync::into_any_arc(self).downcast::<__T>().unwrap())
Expand Down

0 comments on commit 9b1eb58

Please sign in to comment.