Skip to content

Commit cd20221

Browse files
committed
Merge #179: Fixed error message for too long hrp prefix
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
2 parents c2aac49 + c0220d8 commit cd20221

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/primitives/hrp.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,8 @@ impl fmt::Display for Error {
393393
use Error::*;
394394

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

0 commit comments

Comments
 (0)