cl-structures: Do not #[derive(Eq)] for Interned<T>
Derive places Eq bound on T, which is not true of Interned<T>
This commit is contained in:
parent
c9266d971f
commit
33b7cd3971
@ -26,7 +26,6 @@ pub mod interned {
|
||||
/// dereference to the wrapped pointers, and as such, may produce
|
||||
/// results inconsistent with [PartialEq] or [Eq].
|
||||
#[repr(transparent)]
|
||||
#[derive(Eq)]
|
||||
pub struct Interned<'a, T: ?Sized> {
|
||||
value: &'a T,
|
||||
}
|
||||
@ -80,6 +79,7 @@ pub mod interned {
|
||||
// }
|
||||
// }
|
||||
|
||||
impl<'a, T: ?Sized> Eq for Interned<'a, T> {}
|
||||
impl<'a, T: ?Sized> PartialEq for Interned<'a, T> {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
std::ptr::eq(self.value, other.value)
|
||||
|
Loading…
Reference in New Issue
Block a user