Skip to content

Commit

Permalink
Misc rustfmt change
Browse files Browse the repository at this point in the history
Maybe rustfmt nightly changed something. But it looks like both versions
are accepted by --check check
  • Loading branch information
sanket1729 committed Jun 6, 2022
1 parent acbef2f commit 2e9bd32
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 29 deletions.
24 changes: 10 additions & 14 deletions src/interpreter/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,22 +145,18 @@ impl fmt::Display for Error {
}
Error::IncorrectWScriptHash => f.write_str("witness script did not match scriptpubkey"),
Error::InsufficientSignaturesMultiSig => f.write_str("Insufficient signatures for CMS"),
Error::InvalidSchnorrSighashType(ref sig) => {
write!(
f,
"Invalid sighash type for schnorr signature '{}'",
sig.to_hex()
)
}
Error::InvalidSchnorrSighashType(ref sig) => write!(
f,
"Invalid sighash type for schnorr signature '{}'",
sig.to_hex()
),
Error::InvalidEcdsaSignature(pk) => write!(f, "bad ecdsa signature with pk {}", pk),
Error::InvalidSchnorrSignature(pk) => write!(f, "bad schnorr signature with pk {}", pk),
Error::NonStandardSighash(ref sig) => {
write!(
f,
"Non standard sighash type for signature '{}'",
sig.to_hex()
)
}
Error::NonStandardSighash(ref sig) => write!(
f,
"Non standard sighash type for signature '{}'",
sig.to_hex()
),
Error::NonEmptyWitness => f.write_str("legacy spend had nonempty witness"),
Error::NonEmptyScriptSig => f.write_str("segwit spend had nonempty scriptsig"),
Error::Miniscript(ref e) => write!(f, "parse error: {}", e),
Expand Down
16 changes: 4 additions & 12 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -661,18 +661,10 @@ impl fmt::Display for Error {
Error::PubKeyCtxError(ref pk, ref ctx) => {
write!(f, "Pubkey error: {} under {} scriptcontext", pk, ctx)
}
Error::MultiATooManyKeys(k) => {
write!(f, "MultiA too many keys {}", k)
}
Error::TaprootSpendInfoUnavialable => {
write!(f, "Taproot Spend Info not computed.")
}
Error::TrNoScriptCode => {
write!(f, "No script code for Tr descriptors")
}
Error::TrNoExplicitScript => {
write!(f, "No script code for Tr descriptors")
}
Error::MultiATooManyKeys(k) => write!(f, "MultiA too many keys {}", k),
Error::TaprootSpendInfoUnavialable => write!(f, "Taproot Spend Info not computed."),
Error::TrNoScriptCode => write!(f, "No script code for Tr descriptors"),
Error::TrNoExplicitScript => write!(f, "No script code for Tr descriptors"),
}
}
}
Expand Down
4 changes: 1 addition & 3 deletions src/psbt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,7 @@ impl fmt::Display for InputError {
sighashflag {:?} rather than required {:?}",
pubkey, got, required
),
InputError::CouldNotSatisfyTr => {
write!(f, "Could not satisfy Tr descriptor")
}
InputError::CouldNotSatisfyTr => write!(f, "Could not satisfy Tr descriptor"),
InputError::NonStandardSighashType(e) => write!(f, "Non-standard sighash type {}", e),
}
}
Expand Down

0 comments on commit 2e9bd32

Please sign in to comment.