File tree Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,10 @@ fn create(
194
194
Ok ( quote ! {
195
195
use super :: * ;
196
196
197
+ #[ doc( hidden) ]
197
198
impl :: comemo:: Track for #ty { }
199
+
200
+ #[ doc( hidden) ]
198
201
impl :: comemo:: internal:: Trackable for #ty {
199
202
type Constraint = #constraint;
200
203
type Surface = #family;
Original file line number Diff line number Diff line change @@ -12,15 +12,9 @@ use siphasher::sip128::{Hasher128, SipHasher};
12
12
/// functions. Especially recursive structures like trees benefit from
13
13
/// intermediate prehashed nodes.
14
14
///
15
- /// # `Hash` and `Eq`
16
- /// When implementing both `Hash` and `Eq`, the following property [must
17
- /// hold][property]:
18
- /// ```text
19
- /// a == b -> hash(a) == hash(b)
20
- /// ```
21
- /// The inverse implication does not follow from this immediately. However,
22
- /// comemo uses high-quality 128 bit hashes in all places. This reduces the
23
- /// risk of a hash collision to an absolute minimum. Therefore, this trait
15
+ /// # Equality
16
+ /// Because comemo uses high-quality 128 bit hashes in all places, the risk of a
17
+ /// hash collision is reduced to an absolute minimum. Therefore, this trait
24
18
/// additionally provides `PartialEq` and `Eq` implementations that compare by
25
19
/// hash instead of by value.
26
20
///
@@ -101,9 +95,9 @@ impl<T: Default + Hash + 'static> Default for Prehashed<T> {
101
95
}
102
96
}
103
97
104
- impl < T : Eq + ?Sized > Eq for Prehashed < T > { }
98
+ impl < T : ?Sized > Eq for Prehashed < T > { }
105
99
106
- impl < T : PartialEq + ?Sized > PartialEq for Prehashed < T > {
100
+ impl < T : ?Sized > PartialEq for Prehashed < T > {
107
101
#[ inline]
108
102
fn eq ( & self , other : & Self ) -> bool {
109
103
self . hash == other. hash
You can’t perform that action at this time.
0 commit comments