diff --git a/Cargo.toml b/Cargo.toml index d04cab49..d2e540ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ inherent = "1.0" sea-query-attr = { version = "0.1.1", path = "sea-query-attr", default-features = false, optional = true } sea-query-derive = { version = "0.4.0", path = "sea-query-derive", default-features = false, optional = true } serde_json = { version = "1", default-features = false, optional = true, features = ["std"] } -derivative = { version = "2.2", default-features = false, optional = true } +educe = { version = "0.5.11", default-features = false, optional = true, features = ["Hash", "PartialEq", "Eq"] } chrono = { version = "0.4.27", default-features = false, optional = true, features = ["clock"] } postgres-types = { version = "0", default-features = false, optional = true } rust_decimal = { version = "1", default-features = false, optional = true } @@ -56,7 +56,7 @@ backend-sqlite = [] default = ["derive", "backend-mysql", "backend-postgres", "backend-sqlite"] derive = ["sea-query-derive"] attr = ["sea-query-attr"] -hashable-value = ["derivative", "ordered-float"] +hashable-value = ["educe", "ordered-float"] postgres-array = [] postgres-interval = [] thread-safe = [] diff --git a/src/value.rs b/src/value.rs index 176eefef..3c9dbbf2 100644 --- a/src/value.rs +++ b/src/value.rs @@ -126,8 +126,8 @@ pub enum ArrayType { #[cfg_attr(not(feature = "hashable-value"), derive(PartialEq))] #[cfg_attr( feature = "hashable-value", - derive(derivative::Derivative), - derivative(Hash, PartialEq, Eq) + derive(educe::Educe), + educe(Hash, PartialEq, Eq) )] pub enum Value { Bool(Option), @@ -142,9 +142,9 @@ pub enum Value { Float( #[cfg_attr( feature = "hashable-value", - derivative( - Hash(hash_with = "hashable_value::hash_f32"), - PartialEq(compare_with = "hashable_value::cmp_f32") + educe( + Hash(method(hashable_value::hash_f32)), + PartialEq(method(hashable_value::cmp_f32)) ) )] Option, @@ -152,9 +152,9 @@ pub enum Value { Double( #[cfg_attr( feature = "hashable-value", - derivative( - Hash(hash_with = "hashable_value::hash_f64"), - PartialEq(compare_with = "hashable_value::cmp_f64") + educe( + Hash(method(hashable_value::hash_f64)), + PartialEq(method(hashable_value::cmp_f64)) ) )] Option, @@ -170,9 +170,9 @@ pub enum Value { Json( #[cfg_attr( feature = "hashable-value", - derivative( - Hash(hash_with = "hashable_value::hash_json"), - PartialEq(compare_with = "hashable_value::cmp_json") + educe( + Hash(method(hashable_value::hash_json)), + PartialEq(method(hashable_value::cmp_json)) ) )] Option>,