@@ -106,7 +106,7 @@ impl ffi::CPtr for SecretKey {
106106
107107impl str:: FromStr for SecretKey {
108108 type Err = Error ;
109- fn from_str ( s : & str ) -> Result < SecretKey , Error > {
109+ fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
110110 let mut res = [ 0u8 ; constants:: SECRET_KEY_SIZE ] ;
111111 match from_hex ( s, & mut res) {
112112 Ok ( constants:: SECRET_KEY_SIZE ) => SecretKey :: from_slice ( & res) ,
@@ -159,7 +159,7 @@ impl fmt::Display for PublicKey {
159159
160160impl str:: FromStr for PublicKey {
161161 type Err = Error ;
162- fn from_str ( s : & str ) -> Result < PublicKey , Error > {
162+ fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
163163 let mut res = [ 0u8 ; constants:: UNCOMPRESSED_PUBLIC_KEY_SIZE ] ;
164164 match from_hex ( s, & mut res) {
165165 Ok ( constants:: PUBLIC_KEY_SIZE ) =>
@@ -1113,7 +1113,7 @@ impl fmt::Display for XOnlyPublicKey {
11131113
11141114impl str:: FromStr for XOnlyPublicKey {
11151115 type Err = Error ;
1116- fn from_str ( s : & str ) -> Result < XOnlyPublicKey , Error > {
1116+ fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
11171117 let mut res = [ 0u8 ; constants:: SCHNORR_PUBLIC_KEY_SIZE ] ;
11181118 match from_hex ( s, & mut res) {
11191119 Ok ( constants:: SCHNORR_PUBLIC_KEY_SIZE ) =>
0 commit comments