Clippy told me not to implement Hash when deriving PartialEq. Fair enough
This commit is contained in:
parent
84f99fc471
commit
6f03538956
|
@ -693,7 +693,7 @@ impl<'de> serde::Deserialize<'de> for PlainValue {
|
|||
|
||||
use std::rc::Rc;
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
|
||||
#[derive(Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||
pub struct RcValue(Rc<AnnotatedValue<RcValue>>);
|
||||
|
||||
impl NestedValue for RcValue {
|
||||
|
@ -728,12 +728,6 @@ impl NestedValue for RcValue {
|
|||
}
|
||||
}
|
||||
|
||||
impl Hash for RcValue {
|
||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||
(self.0).1.hash(state)
|
||||
}
|
||||
}
|
||||
|
||||
impl Debug for RcValue {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
self.debug_fmt(f)
|
||||
|
@ -756,7 +750,7 @@ impl<'de> serde::Deserialize<'de> for RcValue {
|
|||
|
||||
use std::sync::Arc;
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
|
||||
#[derive(Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||
pub struct ArcValue(Arc<AnnotatedValue<ArcValue>>);
|
||||
|
||||
impl NestedValue for ArcValue {
|
||||
|
@ -791,12 +785,6 @@ impl NestedValue for ArcValue {
|
|||
}
|
||||
}
|
||||
|
||||
impl Hash for ArcValue {
|
||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||
(self.0).1.hash(state)
|
||||
}
|
||||
}
|
||||
|
||||
impl Debug for ArcValue {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
self.debug_fmt(f)
|
||||
|
|
Loading…
Reference in New Issue