Chris Morgan
›
Git
›
anymap
› commitdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
patch
|
inline
| side by side (from parent 1:
724f947
)
commit
grep
author
committer
pickaxe
?
search:
re
Keep Clippy happy.
author
Chris Morgan
<me@chrismorgan.info>
Sun, 6 Mar 2016 13:13:47 +0000
committer
Chris Morgan
<me@chrismorgan.info>
Sun, 6 Mar 2016 13:13:47 +0000
src/raw.rs
patch
|
blob
|
history
diff --git
a/src/raw.rs
b/src/raw.rs
index 31a78e4a2d9bc780e40e6b1c05559dfb6242c991..b103bd7f96b3c1eaf4d21bd28fefc6da81214953 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 }
}
@@
-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")
}
}