Skip to content

Commit ebfb3e2

Browse files
committed
Move associated type to top of impl
As is customary put the associated type at the start of the `FromStr` impl block.
1 parent c5b6226 commit ebfb3e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ellswift.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ impl ElligatorSwiftParty {
288288
}
289289

290290
impl FromStr for ElligatorSwift {
291+
type Err = Error;
292+
291293
fn from_str(hex: &str) -> Result<Self, Self::Err> {
292294
let mut ser = [0u8; 64];
293295
let parsed = from_hex(hex, &mut ser);
@@ -296,7 +298,6 @@ impl FromStr for ElligatorSwift {
296298
_ => Err(Error::InvalidEllSwift),
297299
}
298300
}
299-
type Err = Error;
300301
}
301302

302303
impl fmt::LowerHex for ElligatorSwift {

0 commit comments

Comments
 (0)