Make Clippy happy.
This commit is contained in:
parent
f63062acc6
commit
f38113a9cf
|
@ -122,10 +122,12 @@ macro_rules! implement {
|
|||
}
|
||||
|
||||
impl UncheckedAnyExt for $base $(+ $bounds)* {
|
||||
#[allow(transmute_ptr_to_ref)]
|
||||
unsafe fn downcast_ref_unchecked<T: 'static>(&self) -> &T {
|
||||
mem::transmute(mem::transmute::<_, TraitObject>(self).data)
|
||||
}
|
||||
|
||||
#[allow(transmute_ptr_to_ref)]
|
||||
unsafe fn downcast_mut_unchecked<T: 'static>(&mut self) -> &mut T {
|
||||
mem::transmute(mem::transmute::<_, TraitObject>(self).data)
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ impl_common_methods! {
|
|||
with_capacity(capacity) => HashMap::with_capacity_and_hasher(capacity, Default::default());
|
||||
}
|
||||
|
||||
/// RawMap iterator.
|
||||
/// `RawMap` iterator.
|
||||
#[derive(Clone)]
|
||||
pub struct Iter<'a, A: ?Sized + UncheckedAnyExt> {
|
||||
inner: hash_map::Iter<'a, TypeId, Box<A>>,
|
||||
|
@ -94,7 +94,7 @@ impl<'a, A: ?Sized + UncheckedAnyExt> ExactSizeIterator for Iter<'a, A> {
|
|||
#[inline] fn len(&self) -> usize { self.inner.len() }
|
||||
}
|
||||
|
||||
/// RawMap mutable iterator.
|
||||
/// `RawMap` mutable iterator.
|
||||
pub struct IterMut<'a, A: ?Sized + UncheckedAnyExt> {
|
||||
inner: hash_map::IterMut<'a, TypeId, Box<A>>,
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ impl<'a, A: ?Sized + UncheckedAnyExt> ExactSizeIterator for IterMut<'a, A> {
|
|||
#[inline] fn len(&self) -> usize { self.inner.len() }
|
||||
}
|
||||
|
||||
/// RawMap move iterator.
|
||||
/// `RawMap` move iterator.
|
||||
pub struct IntoIter<A: ?Sized + UncheckedAnyExt> {
|
||||
inner: hash_map::IntoIter<TypeId, Box<A>>,
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ impl<A: ?Sized + UncheckedAnyExt> ExactSizeIterator for IntoIter<A> {
|
|||
#[inline] fn len(&self) -> usize { self.inner.len() }
|
||||
}
|
||||
|
||||
/// RawMap drain iterator.
|
||||
/// `RawMap` drain iterator.
|
||||
pub struct Drain<'a, A: ?Sized + UncheckedAnyExt> {
|
||||
inner: hash_map::Drain<'a, TypeId, Box<A>>,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue