Skip to content

Commit

Permalink
Replace derivative by educe (#763)
Browse files Browse the repository at this point in the history
* chore(deps): replace derivative by educe

* refactor: replace derivative derive by educe
  • Loading branch information
negezor committed Apr 14, 2024
1 parent ae1eadb commit 656e3aa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -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 = []
Expand Down
22 changes: 11 additions & 11 deletions src/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool>),
Expand All @@ -142,19 +142,19 @@ 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<f32>,
),
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<f64>,
Expand All @@ -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<Box<Json>>,
Expand Down

0 comments on commit 656e3aa

Please sign in to comment.