Skip to content

Commit

Permalink
Move associated type to top of impl
Browse files Browse the repository at this point in the history
As is customary put the associated type at the start of the `FromStr`
impl block.
  • Loading branch information
tcharding committed Nov 6, 2023
1 parent c5b6226 commit ebfb3e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ellswift.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ impl ElligatorSwiftParty {
}

impl FromStr for ElligatorSwift {
type Err = Error;

fn from_str(hex: &str) -> Result<Self, Self::Err> {
let mut ser = [0u8; 64];
let parsed = from_hex(hex, &mut ser);
Expand All @@ -296,7 +298,6 @@ impl FromStr for ElligatorSwift {
_ => Err(Error::InvalidEllSwift),
}
}
type Err = Error;
}

impl fmt::LowerHex for ElligatorSwift {
Expand Down

0 comments on commit ebfb3e2

Please sign in to comment.