Skip to content

Commit

Permalink
Merge fef21fd into da6d69d
Browse files Browse the repository at this point in the history
  • Loading branch information
jpschorr authored Nov 16, 2024
2 parents da6d69d + fef21fd commit e1cb1b6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion partiql-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ thiserror = "1"

indexmap = "2.5"

derivative = "2.2"
educe = "0.6"

[dev-dependencies]
28 changes: 14 additions & 14 deletions partiql-types/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![deny(rust_2018_idioms)]
#![deny(clippy::all)]

use derivative::Derivative;
use educe::Educe;
use indexmap::IndexSet;
use itertools::Itertools;
use miette::Diagnostic;
Expand Down Expand Up @@ -584,11 +584,11 @@ impl PartiqlShapeBuilder {
}
}

#[derive(Derivative, Eq, Debug, Clone)]
#[derivative(PartialEq, Hash)]
#[derive(Educe, Eq, Debug, Clone)]
#[educe(PartialEq, Hash)]
#[allow(dead_code)]
pub struct AnyOf {
#[derivative(Hash(hash_with = "indexset_hash"))]
#[educe(Hash(method(indexset_hash)))]
types: IndexSet<PartiqlShape>,
}

Expand Down Expand Up @@ -743,11 +743,11 @@ impl Display for Static {

pub const TYPE_DYNAMIC: PartiqlShape = PartiqlShape::Dynamic;

#[derive(Derivative, Eq, Debug, Clone)]
#[derivative(PartialEq, Hash)]
#[derive(Educe, Eq, Debug, Clone)]
#[educe(PartialEq, Hash)]
#[allow(dead_code)]
pub struct StructType {
#[derivative(Hash(hash_with = "indexset_hash"))]
#[educe(Hash(method(indexset_hash)))]
constraints: IndexSet<StructConstraint>,
}

Expand Down Expand Up @@ -827,15 +827,15 @@ impl Display for StructType {
}
}

#[derive(Derivative, Eq, Debug, Clone)]
#[derivative(PartialEq, Hash)]
#[derive(Educe, Eq, Debug, Clone)]
#[educe(PartialEq, Hash)]
#[allow(dead_code)]
#[non_exhaustive]
pub enum StructConstraint {
Open(bool),
Ordered(bool),
DuplicateAttrs(bool),
Fields(#[derivative(Hash(hash_with = "indexset_hash"))] IndexSet<StructField>),
Fields(#[educe(Hash(method(indexset_hash)))] IndexSet<StructField>),
}

#[derive(Debug, Clone, Hash, Eq, PartialEq)]
Expand Down Expand Up @@ -901,8 +901,8 @@ impl From<(&str, PartiqlShape, bool)> for StructField {
}
}

#[derive(Derivative, Eq, Debug, Clone)]
#[derivative(PartialEq, Hash)]
#[derive(Educe, Eq, Debug, Clone)]
#[educe(PartialEq, Hash)]
#[allow(dead_code)]
pub struct BagType {
element_type: Box<PartiqlShape>,
Expand Down Expand Up @@ -938,8 +938,8 @@ impl Display for BagType {
}
}

#[derive(Derivative, Eq, Debug, Clone)]
#[derivative(PartialEq, Hash)]
#[derive(Educe, Eq, Debug, Clone)]
#[educe(PartialEq, Hash)]
#[allow(dead_code)]
pub struct ArrayType {
element_type: Box<PartiqlShape>,
Expand Down

0 comments on commit e1cb1b6

Please sign in to comment.