Skip to content

Commit 57bbde8

Browse files
committedSep 3, 2024··
remove PartialEq bound from top-level Error type
This might annoy some people, but it will be necessary in order to hold generic pubkey error types inside of our error returns. Our alternatives are: * Implement some manual hacky notion of equality for pubkey error (either "never equal" or "equal based on comparing output of fmt::Display or something) * Add a PartialEq bound on all the <Pk as FromStr>::Err types, which would make it impossible to use anything that e.g. contained an io error. I don't think ether of these are good, and given that io::Error has "set the standard" for error types to have basically no useful trait bounds other than Debug and Display, we are okay to do this.
1 parent 3649850 commit 57bbde8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ pub trait ForEachKey<Pk: MiniscriptKey> {
409409

410410
/// Miniscript
411411
412-
#[derive(Debug, PartialEq)]
412+
#[derive(Debug)]
413413
pub enum Error {
414414
/// Opcode appeared which is not part of the script subset
415415
InvalidOpcode(Opcode),

0 commit comments

Comments
 (0)
Please sign in to comment.