Skip to content

Commit d692972

Browse files
committed
Add rustfmt::skip to Display impl
`Display` imlps often include long lines but the code is simple and having it split over 4 lines is a waist of vertical space.
1 parent b7642a6 commit d692972

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/primitives/decode.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -589,19 +589,16 @@ pub enum SegwitHrpstringError {
589589
Checksum(ChecksumError),
590590
}
591591

592+
#[rustfmt::skip]
592593
impl fmt::Display for SegwitHrpstringError {
593594
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
594595
use SegwitHrpstringError::*;
595596

596597
match *self {
597598
Unchecked(ref e) => write_err!(f, "parsing unchecked hrpstring failed"; e),
598599
NoData => write!(f, "no data found after removing the checksum"),
599-
TooLong(len) => write!(
600-
f,
601-
"encoded length {} exceeds spec limit {} chars",
602-
len,
603-
segwit::MAX_STRING_LENGTH
604-
),
600+
TooLong(len) =>
601+
write!(f, "encoded length {} exceeds spec limit {} chars", len, segwit::MAX_STRING_LENGTH),
605602
InvalidWitnessVersion(fe) => write!(f, "invalid segwit witness version: {}", fe),
606603
Padding(ref e) => write_err!(f, "invalid padding on the witness data"; e),
607604
WitnessLength(ref e) => write_err!(f, "invalid witness length"; e),

0 commit comments

Comments
 (0)