Skip to content

Commit

Permalink
Revert Self idiom (stabilized in Rust 1.32)
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkmoody committed Feb 12, 2021
1 parent 9b86c51 commit 9444b11
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,16 +426,16 @@ impl Variant {
// Produce the variant based on the remainder of the polymod operation
fn from_remainder(c: u32) -> Option<Self> {
match c {
BECH32_CONST => Some(Self::Bech32),
BECH32M_CONST => Some(Self::Bech32m),
BECH32_CONST => Some(Variant::Bech32),
BECH32M_CONST => Some(Variant::Bech32m),
_ => None,
}
}

fn constant(self) -> u32 {
match self {
Self::Bech32 => BECH32_CONST,
Self::Bech32m => BECH32M_CONST,
Variant::Bech32 => BECH32_CONST,
Variant::Bech32m => BECH32M_CONST,
}
}
}
Expand Down

0 comments on commit 9444b11

Please sign in to comment.