Skip to content

Commit

Permalink
use educe for PartialEq
Browse files Browse the repository at this point in the history
  • Loading branch information
bing committed Jun 10, 2024
1 parent c72d5c3 commit dfc03ad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ark-ff = "0.3.0"
ark-bls12-381 = "0.3.0" # bls12-381 curve for r1cs backend
ark-bn254 = "0.3.0" # bn128 curve for r1cs backend
ark-serialize = "0.3.0" # serialization of arkworks types
educe = { version = "0.6", default-features = false, features = ["Hash"] }
educe = { version = "0.6", default-features = false, features = ["Hash", "PartialEq"] }
ena = "0.14.0" # union-find implementation for the wiring
num-bigint = "0.4.3" # big int library
camino = "1.1.1" # to replace Path and PathBuf
Expand Down
2 changes: 1 addition & 1 deletion book/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ additional-css = ["./mdbook-admonish.css"]

[preprocessor.admonish]
command = "mdbook-admonish"
assets_version = "3.0.2" # do not edit: managed by `mdbook-admonish install`
assets_version = "3.0.2" # do not edit: managed by `mdbook-admonish install`
9 changes: 2 additions & 7 deletions src/parser/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,19 +394,14 @@ impl FnSig {

/// Any kind of text that can represent a type, a variable, a function name, etc.
#[derive(Debug, Default, Clone, Eq, Serialize, Deserialize, Educe)]
#[educe(Hash)]
#[educe(Hash, PartialEq)]
pub struct Ident {
pub value: String,
#[educe(Hash(ignore))]
#[educe(PartialEq(ignore))]
pub span: Span,
}

impl PartialEq for Ident {
fn eq(&self, other: &Self) -> bool {
self.value == other.value
}
}

impl Ident {
pub fn new(value: String, span: Span) -> Self {
Self { value, span }
Expand Down

0 comments on commit dfc03ad

Please sign in to comment.