@@ -111,7 +111,7 @@ impl ffi::CPtr for SecretKey {
111
111
112
112
impl str:: FromStr for SecretKey {
113
113
type Err = Error ;
114
- fn from_str ( s : & str ) -> Result < SecretKey , Error > {
114
+ fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
115
115
let mut res = [ 0u8 ; constants:: SECRET_KEY_SIZE ] ;
116
116
match from_hex ( s, & mut res) {
117
117
Ok ( constants:: SECRET_KEY_SIZE ) => SecretKey :: from_slice ( & res) ,
@@ -164,7 +164,7 @@ impl fmt::Display for PublicKey {
164
164
165
165
impl str:: FromStr for PublicKey {
166
166
type Err = Error ;
167
- fn from_str ( s : & str ) -> Result < PublicKey , Error > {
167
+ fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
168
168
let mut res = [ 0u8 ; constants:: UNCOMPRESSED_PUBLIC_KEY_SIZE ] ;
169
169
match from_hex ( s, & mut res) {
170
170
Ok ( constants:: PUBLIC_KEY_SIZE ) =>
@@ -1128,7 +1128,7 @@ impl fmt::Display for XOnlyPublicKey {
1128
1128
1129
1129
impl str:: FromStr for XOnlyPublicKey {
1130
1130
type Err = Error ;
1131
- fn from_str ( s : & str ) -> Result < XOnlyPublicKey , Error > {
1131
+ fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
1132
1132
let mut res = [ 0u8 ; constants:: SCHNORR_PUBLIC_KEY_SIZE ] ;
1133
1133
match from_hex ( s, & mut res) {
1134
1134
Ok ( constants:: SCHNORR_PUBLIC_KEY_SIZE ) =>
0 commit comments