Skip to content

Commit

Permalink
seals: make merge return custom error type
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Dec 22, 2024
1 parent 132ed3e commit 293358f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions single_use_seals/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ pub trait ClientSideWitness: Eq {
msg: <Self::Seal as SingleUseSeal>::Message,
) -> Result<Self::Proof, Self::Error>;

fn merge(&mut self, other: Self) -> Result<(), Self::Error>
fn merge(&mut self, other: Self) -> Result<(), impl Error>
where Self: Sized;
}

Expand All @@ -199,9 +199,9 @@ impl<Seal: SingleUseSeal> ClientSideWitness for NoWitness<Seal> {

fn convolve_commit(&self, msg: Seal::Message) -> Result<Self::Proof, Self::Error> { Ok(msg) }

fn merge(&mut self, _: Self) -> Result<(), Self::Error>
fn merge(&mut self, _: Self) -> Result<(), impl Error>
where Self: Sized {
Ok(())
Ok::<_, Infallible>(())
}
}

Expand Down

0 comments on commit 293358f

Please sign in to comment.