chore: remove useless Hash impl
This commit is contained in:
@@ -107,16 +107,3 @@ impl PartialEq for Const {
|
||||
}
|
||||
|
||||
impl Eq for Const {}
|
||||
|
||||
/* impl Hash for Const {
|
||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||
use Const::*;
|
||||
match self {
|
||||
Bool(b) => b.hash(state),
|
||||
Int(int) => int.hash(state),
|
||||
Float(float) => float.to_bits().hash(state),
|
||||
String(string) => string.hash(state),
|
||||
Func(func) => func.hash(state),
|
||||
}
|
||||
}
|
||||
} */
|
||||
|
||||
@@ -27,7 +27,7 @@ pub trait ToPublic {
|
||||
fn to_public(self, vm: &VM) -> p::Value;
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Hash, Clone, Copy, Constructor)]
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy, Constructor)]
|
||||
pub struct Thunk(usize);
|
||||
|
||||
#[derive(Debug, IsVariant, Unwrap, Clone, PartialEq)]
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
use std::hash::{Hash, Hasher};
|
||||
|
||||
use anyhow::Error;
|
||||
use derive_more::{IsVariant, Unwrap};
|
||||
use ecow::EcoString;
|
||||
@@ -121,16 +119,3 @@ impl PartialEq for Const {
|
||||
}
|
||||
|
||||
impl Eq for Const {}
|
||||
|
||||
impl Hash for Const {
|
||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||
use Const::*;
|
||||
match self {
|
||||
Bool(b) => b.hash(state),
|
||||
Int(int) => int.hash(state),
|
||||
Float(float) => float.to_bits().hash(state),
|
||||
String(string) => string.hash(state),
|
||||
func @ Func => func.hash(state),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user