Implement Eq alongside Hash

It turns out implementing Hash alone is not very useful, as
std::collection::HashMap keys are required to implement both Hash and
Eq.

Co-authored-by: Nikhil Benesch <nikhil.benesch@gmail.com>
This commit is contained in:
Jamie Brandon 2019-06-12 14:03:24 +01:00 committed by Nikhil Benesch
parent f7199ec99f
commit add898c2bd
No known key found for this signature in database
GPG key ID: FCF98542083C5A69
6 changed files with 40 additions and 40 deletions

View file

@ -13,7 +13,7 @@
use ordered_float::OrderedFloat;
/// Primitive SQL values such as number and string
#[derive(Debug, Clone, PartialEq, Hash)]
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum Value {
/// Unsigned integer value
Long(u64),
@ -113,7 +113,7 @@ impl ToString for Value {
}
}
#[derive(Debug, Clone, PartialEq, Hash)]
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum DateTimeField {
Year,
Month,