@@ -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 ) =>
@@ -1111,7 +1111,7 @@ impl fmt::Display for XOnlyPublicKey {
11111111
11121112impl str:: FromStr for XOnlyPublicKey {
11131113 type Err = Error ;
1114- fn from_str ( s : & str ) -> Result < XOnlyPublicKey , Error > {
1114+ fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
11151115 let mut res = [ 0u8 ; constants:: SCHNORR_PUBLIC_KEY_SIZE ] ;
11161116 match from_hex ( s, & mut res) {
11171117 Ok ( constants:: SCHNORR_PUBLIC_KEY_SIZE ) =>
0 commit comments