@@ -106,7 +106,7 @@ impl ffi::CPtr for SecretKey {
106
106
107
107
impl str:: FromStr for SecretKey {
108
108
type Err = Error ;
109
- fn from_str ( s : & str ) -> Result < SecretKey , Error > {
109
+ fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
110
110
let mut res = [ 0u8 ; constants:: SECRET_KEY_SIZE ] ;
111
111
match from_hex ( s, & mut res) {
112
112
Ok ( constants:: SECRET_KEY_SIZE ) => SecretKey :: from_slice ( & res) ,
@@ -159,7 +159,7 @@ impl fmt::Display for PublicKey {
159
159
160
160
impl str:: FromStr for PublicKey {
161
161
type Err = Error ;
162
- fn from_str ( s : & str ) -> Result < PublicKey , Error > {
162
+ fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
163
163
let mut res = [ 0u8 ; constants:: UNCOMPRESSED_PUBLIC_KEY_SIZE ] ;
164
164
match from_hex ( s, & mut res) {
165
165
Ok ( constants:: PUBLIC_KEY_SIZE ) =>
@@ -1111,7 +1111,7 @@ impl fmt::Display for XOnlyPublicKey {
1111
1111
1112
1112
impl str:: FromStr for XOnlyPublicKey {
1113
1113
type Err = Error ;
1114
- fn from_str ( s : & str ) -> Result < XOnlyPublicKey , Error > {
1114
+ fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
1115
1115
let mut res = [ 0u8 ; constants:: SCHNORR_PUBLIC_KEY_SIZE ] ;
1116
1116
match from_hex ( s, & mut res) {
1117
1117
Ok ( constants:: SCHNORR_PUBLIC_KEY_SIZE ) =>
0 commit comments