Skip to content

Commit 2e9bd32

Browse files
committed
Misc rustfmt change
Maybe rustfmt nightly changed something. But it looks like both versions are accepted by --check check
1 parent acbef2f commit 2e9bd32

File tree

3 files changed

+15
-29
lines changed

3 files changed

+15
-29
lines changed

src/interpreter/error.rs

+10-14
Original file line numberDiff line numberDiff line change
@@ -145,22 +145,18 @@ impl fmt::Display for Error {
145145
}
146146
Error::IncorrectWScriptHash => f.write_str("witness script did not match scriptpubkey"),
147147
Error::InsufficientSignaturesMultiSig => f.write_str("Insufficient signatures for CMS"),
148-
Error::InvalidSchnorrSighashType(ref sig) => {
149-
write!(
150-
f,
151-
"Invalid sighash type for schnorr signature '{}'",
152-
sig.to_hex()
153-
)
154-
}
148+
Error::InvalidSchnorrSighashType(ref sig) => write!(
149+
f,
150+
"Invalid sighash type for schnorr signature '{}'",
151+
sig.to_hex()
152+
),
155153
Error::InvalidEcdsaSignature(pk) => write!(f, "bad ecdsa signature with pk {}", pk),
156154
Error::InvalidSchnorrSignature(pk) => write!(f, "bad schnorr signature with pk {}", pk),
157-
Error::NonStandardSighash(ref sig) => {
158-
write!(
159-
f,
160-
"Non standard sighash type for signature '{}'",
161-
sig.to_hex()
162-
)
163-
}
155+
Error::NonStandardSighash(ref sig) => write!(
156+
f,
157+
"Non standard sighash type for signature '{}'",
158+
sig.to_hex()
159+
),
164160
Error::NonEmptyWitness => f.write_str("legacy spend had nonempty witness"),
165161
Error::NonEmptyScriptSig => f.write_str("segwit spend had nonempty scriptsig"),
166162
Error::Miniscript(ref e) => write!(f, "parse error: {}", e),

src/lib.rs

+4-12
Original file line numberDiff line numberDiff line change
@@ -661,18 +661,10 @@ impl fmt::Display for Error {
661661
Error::PubKeyCtxError(ref pk, ref ctx) => {
662662
write!(f, "Pubkey error: {} under {} scriptcontext", pk, ctx)
663663
}
664-
Error::MultiATooManyKeys(k) => {
665-
write!(f, "MultiA too many keys {}", k)
666-
}
667-
Error::TaprootSpendInfoUnavialable => {
668-
write!(f, "Taproot Spend Info not computed.")
669-
}
670-
Error::TrNoScriptCode => {
671-
write!(f, "No script code for Tr descriptors")
672-
}
673-
Error::TrNoExplicitScript => {
674-
write!(f, "No script code for Tr descriptors")
675-
}
664+
Error::MultiATooManyKeys(k) => write!(f, "MultiA too many keys {}", k),
665+
Error::TaprootSpendInfoUnavialable => write!(f, "Taproot Spend Info not computed."),
666+
Error::TrNoScriptCode => write!(f, "No script code for Tr descriptors"),
667+
Error::TrNoExplicitScript => write!(f, "No script code for Tr descriptors"),
676668
}
677669
}
678670
}

src/psbt/mod.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,7 @@ impl fmt::Display for InputError {
238238
sighashflag {:?} rather than required {:?}",
239239
pubkey, got, required
240240
),
241-
InputError::CouldNotSatisfyTr => {
242-
write!(f, "Could not satisfy Tr descriptor")
243-
}
241+
InputError::CouldNotSatisfyTr => write!(f, "Could not satisfy Tr descriptor"),
244242
InputError::NonStandardSighashType(e) => write!(f, "Non-standard sighash type {}", e),
245243
}
246244
}

0 commit comments

Comments
 (0)