Skip to content

Commit

Permalink
Merge #179: Fixed error message for too long hrp prefix
Browse files Browse the repository at this point in the history
c0220d8 Run 'cargo +nightly fmt' on this. Options in rustfmt.toml apply only in nightly channel. (Dariusz Depta)
9309183 Removed unneeded test. (Dariusz Depta)
ef50d6d Fixed error message for too long hrp. (Dariusz Depta)

Pull request description:

  closes #178

ACKs for top commit:
  apoelstra:
    ACK c0220d8 though in future, please squash together commits which modify previous commits

Tree-SHA512: e876684ad0560c268af695500af0936dd8803598325e61647589c8f5469a8002bb7c18fc547a1a691803ab0d40b8b6e713ae22f1ff63ec56c38af38567f04d98
  • Loading branch information
apoelstra committed Mar 5, 2024
2 parents c2aac49 + c0220d8 commit cd20221
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/primitives/hrp.rs
Expand Up @@ -393,7 +393,8 @@ impl fmt::Display for Error {
use Error::*;

match *self {
TooLong(len) => write!(f, "hrp is too long, found {} characters, must be <= 126", len),
TooLong(len) =>
write!(f, "hrp is too long, found {} characters, must be <= {}", len, MAX_HRP_LEN),
Empty => write!(f, "hrp is empty, must have at least 1 character"),
NonAsciiChar(c) => write!(f, "found non-ASCII character: {}", c),
InvalidAsciiByte(b) => write!(f, "byte value is not valid US-ASCII: \'{:x}\'", b),
Expand Down

0 comments on commit cd20221

Please sign in to comment.