Skip to content

Commit 56d6740

Browse files
committed
Merge #133: Remove Hrp::is_empty
0909bec Remove Hrp::is_empty (Tobin C. Harding) Pull request description: This function always returns `false`, it is pointless - remove it. ACKs for top commit: apoelstra: ACK 0909bec Tree-SHA512: ab36cc32aed6658894323cda726bf0fd30c22ede7f92dba7480e49692fdbf566741a48ad7842e84859f12e583c4cf17e2c0a203b99e967b014b62ab24172341d
2 parents f982bb9 + 0909bec commit 56d6740

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/primitives/hrp.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,9 @@ impl Hrp {
178178
///
179179
/// Guaranteed to be between 1 and 83 inclusive.
180180
#[inline]
181+
#[allow(clippy::len_without_is_empty)] // HRP is never empty.
181182
pub fn len(&self) -> usize { self.size }
182183

183-
/// Always false, the human-readable part is guaranteed to be between 1-83 characters.
184-
#[inline]
185-
pub fn is_empty(&self) -> bool { false }
186-
187184
/// Returns `true` if this [`Hrp`] is valid according to the bips.
188185
///
189186
/// [BIP-173] states that the HRP must be either "bc" or "tb".

0 commit comments

Comments
 (0)