Skip to content

Commit

Permalink
Remove Hrp::is_empty
Browse files Browse the repository at this point in the history
This function always returns `false`, it is pointless - remove it.
  • Loading branch information
tcharding committed Oct 4, 2023
1 parent f982bb9 commit 0909bec
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/primitives/hrp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,9 @@ impl Hrp {
///
/// Guaranteed to be between 1 and 83 inclusive.
#[inline]
#[allow(clippy::len_without_is_empty)] // HRP is never empty.
pub fn len(&self) -> usize { self.size }

/// Always false, the human-readable part is guaranteed to be between 1-83 characters.
#[inline]
pub fn is_empty(&self) -> bool { false }

/// Returns `true` if this [`Hrp`] is valid according to the bips.
///
/// [BIP-173] states that the HRP must be either "bc" or "tb".
Expand Down

0 comments on commit 0909bec

Please sign in to comment.