Remove InvalidInternalKey variant from TaprootBuilderError

This variant is unused, remove it.

Done as part of #2883.
This commit is contained in:
Tobin C. Harding 2024-06-20 13:03:59 +10:00
parent 9ddd7dacac
commit e8250cd96a
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 0 additions and 6 deletions

View File

@ -1337,8 +1337,6 @@ pub enum TaprootBuilderError {
NodeNotInDfsOrder,
/// Two nodes at depth 0 are not allowed.
OverCompleteTree,
/// Invalid taproot internal key.
InvalidInternalKey(secp256k1::Error),
/// Called finalize on a empty tree.
EmptyTree,
}
@ -1365,9 +1363,6 @@ impl fmt::Display for TaprootBuilderError {
"Attempted to create a tree with two nodes at depth 0. There must\
only be a exactly one node at depth 0",
),
InvalidInternalKey(ref e) => {
write_err!(f, "invalid internal x-only key"; e)
}
EmptyTree => {
write!(f, "Called finalize on an empty tree")
}
@ -1381,7 +1376,6 @@ impl std::error::Error for TaprootBuilderError {
use TaprootBuilderError::*;
match self {
InvalidInternalKey(e) => Some(e),
InvalidMerkleTreeDepth(_) | NodeNotInDfsOrder | OverCompleteTree | EmptyTree => None,
}
}