Chris Morgan
›
Git
›
anymap
› blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
commit
grep
author
committer
pickaxe
?
search:
re
Remove now-unnecessary #[allow]s.
[anymap]
/
src
/
raw.rs
diff --git
a/src/raw.rs
b/src/raw.rs
index 31a78e4a2d9bc780e40e6b1c05559dfb6242c991..3645429663756e9dacce3cf3ac0440a2c6a06e59 100644
(file)
--- a/
src/raw.rs
+++ b/
src/raw.rs
@@
-19,7
+19,7
@@
struct TypeIdHasher {
}
impl Hasher for TypeIdHasher {
}
impl Hasher for TypeIdHasher {
- #[inline
(always)
]
+ #[inline]
fn write(&mut self, bytes: &[u8]) {
// This expects to receive one and exactly one 64-bit value
debug_assert!(bytes.len() == 8);
fn write(&mut self, bytes: &[u8]) {
// This expects to receive one and exactly one 64-bit value
debug_assert!(bytes.len() == 8);
@@
-28,7
+28,7
@@
impl Hasher for TypeIdHasher {
}
}
}
}
- #[inline
(always)
]
+ #[inline]
fn finish(&self) -> u64 { self.value }
}
fn finish(&self) -> u64 { self.value }
}
@@
-80,7
+80,7
@@
impl_common_methods! {
with_capacity(capacity) => HashMap::with_capacity_and_hasher(capacity, Default::default());
}
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>>,
#[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() }
}
#[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>>,
}
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() }
}
#[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>>,
}
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() }
}
#[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>>,
}
pub struct Drain<'a, A: ?Sized + UncheckedAnyExt> {
inner: hash_map::Drain<'a, TypeId, Box<A>>,
}
@@
-229,13
+229,13
@@
impl<A: ?Sized + UncheckedAnyExt> RawMap<A> {
impl<A: ?Sized + UncheckedAnyExt, Q> Index<Q> for RawMap<A> where TypeId: Borrow<Q>, Q: Eq + Hash {
type Output = A;
impl<A: ?Sized + UncheckedAnyExt, Q> Index<Q> for RawMap<A> where TypeId: Borrow<Q>, Q: Eq + Hash {
type Output = A;
- fn index
<'a>(&'a self, index: Q) -> &'a
A {
+ fn index
(&self, index: Q) -> &
A {
self.get(&index).expect("no entry found for key")
}
}
impl<A: ?Sized + UncheckedAnyExt, Q> IndexMut<Q> for RawMap<A> where TypeId: Borrow<Q>, Q: Eq + Hash {
self.get(&index).expect("no entry found for key")
}
}
impl<A: ?Sized + UncheckedAnyExt, Q> IndexMut<Q> for RawMap<A> where TypeId: Borrow<Q>, Q: Eq + Hash {
- fn index_mut
<'a>(&'a mut self, index: Q) -> &'a
mut A {
+ fn index_mut
(&mut self, index: Q) -> &
mut A {
self.get_mut(&index).expect("no entry found for key")
}
}
self.get_mut(&index).expect("no entry found for key")
}
}