Skip to content

Commit

Permalink
fix(aztec-nr): Make impls not stricter than traits (#7502)
Browse files Browse the repository at this point in the history
After noir-lang/noir#5343 any impl that is
stricter than its trait will trigger an error. This fixes those
occurrences.
  • Loading branch information
vezenovm authored Jul 16, 2024
1 parent a4acd12 commit c498934
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,14 @@ impl<T> ScheduledValueChange<T> {
}
}

impl<T> Serialize<3> for ScheduledValueChange<T> {
fn serialize(self) -> [Field; 3] where T: ToField {
impl<T> Serialize<3> for ScheduledValueChange<T> where T: ToField {
fn serialize(self) -> [Field; 3] {
[self.pre.to_field(), self.post.to_field(), self.block_of_change.to_field()]
}
}

impl<T> Deserialize<3> for ScheduledValueChange<T> {
fn deserialize(input: [Field; 3]) -> Self where T: FromField {
impl<T> Deserialize<3> for ScheduledValueChange<T> where T: FromField {
fn deserialize(input: [Field; 3]) -> Self {
Self {
pre: FromField::from_field(input[0]),
post: FromField::from_field(input[1]),
Expand All @@ -153,8 +153,8 @@ impl<T> Deserialize<3> for ScheduledValueChange<T> {
}
}

impl<T> Eq for ScheduledValueChange<T> {
fn eq(self, other: Self) -> bool where T: Eq {
impl<T> Eq for ScheduledValueChange<T> where T: Eq {
fn eq(self, other: Self) -> bool {
(self.pre == other.pre) & (self.post == other.post) & (self.block_of_change == other.block_of_change)
}
}

0 comments on commit c498934

Please sign in to comment.