@@ -112,7 +112,7 @@ impl ffi::CPtr for SecretKey {
112112
113113impl str:: FromStr for SecretKey {
114114 type Err = Error ;
115- fn from_str ( s : & str ) -> Result < SecretKey , Error > {
115+ fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
116116 let mut res = [ 0u8 ; constants:: SECRET_KEY_SIZE ] ;
117117 match from_hex ( s, & mut res) {
118118 Ok ( constants:: SECRET_KEY_SIZE ) => SecretKey :: from_slice ( & res) ,
@@ -165,7 +165,7 @@ impl fmt::Display for PublicKey {
165165
166166impl str:: FromStr for PublicKey {
167167 type Err = Error ;
168- fn from_str ( s : & str ) -> Result < PublicKey , Error > {
168+ fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
169169 let mut res = [ 0u8 ; constants:: UNCOMPRESSED_PUBLIC_KEY_SIZE ] ;
170170 match from_hex ( s, & mut res) {
171171 Ok ( constants:: PUBLIC_KEY_SIZE ) =>
@@ -1132,7 +1132,7 @@ impl fmt::Display for XOnlyPublicKey {
11321132
11331133impl str:: FromStr for XOnlyPublicKey {
11341134 type Err = Error ;
1135- fn from_str ( s : & str ) -> Result < XOnlyPublicKey , Error > {
1135+ fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
11361136 let mut res = [ 0u8 ; constants:: SCHNORR_PUBLIC_KEY_SIZE ] ;
11371137 match from_hex ( s, & mut res) {
11381138 Ok ( constants:: SCHNORR_PUBLIC_KEY_SIZE ) =>
0 commit comments