Fix typo and minor formatting in address::Error

This commit is contained in:
Steven Roose 2020-05-23 23:20:19 +01:00
parent 31a576020b
commit 59b5a73a55
No known key found for this signature in database
GPG Key ID: 2F2A88D7F8D68E87
1 changed files with 5 additions and 8 deletions

View File

@ -73,15 +73,12 @@ impl fmt::Display for Error {
Error::Bech32(ref e) => write!(f, "bech32: {}", e), Error::Bech32(ref e) => write!(f, "bech32: {}", e),
Error::EmptyBech32Payload => write!(f, "the bech32 payload was empty"), Error::EmptyBech32Payload => write!(f, "the bech32 payload was empty"),
Error::InvalidWitnessVersion(v) => write!(f, "invalid witness script version: {}", v), Error::InvalidWitnessVersion(v) => write!(f, "invalid witness script version: {}", v),
Error::InvalidWitnessProgramLength(l) => write!( Error::InvalidWitnessProgramLength(l) => write!(f,
f, "the witness program must be between 2 and 40 bytes in length: length={}", l,
"the witness program must be between 2 and 40 bytes in length: lengh={}", ),
l Error::InvalidSegwitV0ProgramLength(l) => write!(f,
"a v0 witness program must be either of length 20 or 32 bytes: length={}", l,
), ),
Error::InvalidSegwitV0ProgramLength(l) => write!(
f,
"a v0 witness program must be either of length 20 or 32 bytes: length={}",
l
), ),
} }
} }