@@ -111,7 +111,7 @@ impl ffi::CPtr for SecretKey {
111111
112112impl str:: FromStr for SecretKey {
113113 type Err = Error ;
114- fn from_str ( s : & str ) -> Result < SecretKey , Error > {
114+ fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
115115 let mut res = [ 0u8 ; constants:: SECRET_KEY_SIZE ] ;
116116 match from_hex ( s, & mut res) {
117117 Ok ( constants:: SECRET_KEY_SIZE ) => SecretKey :: from_slice ( & res) ,
@@ -164,7 +164,7 @@ impl fmt::Display for PublicKey {
164164
165165impl str:: FromStr for PublicKey {
166166 type Err = Error ;
167- fn from_str ( s : & str ) -> Result < PublicKey , Error > {
167+ fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
168168 let mut res = [ 0u8 ; constants:: UNCOMPRESSED_PUBLIC_KEY_SIZE ] ;
169169 match from_hex ( s, & mut res) {
170170 Ok ( constants:: PUBLIC_KEY_SIZE ) =>
@@ -1128,7 +1128,7 @@ impl fmt::Display for XOnlyPublicKey {
11281128
11291129impl str:: FromStr for XOnlyPublicKey {
11301130 type Err = Error ;
1131- fn from_str ( s : & str ) -> Result < XOnlyPublicKey , Error > {
1131+ fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
11321132 let mut res = [ 0u8 ; constants:: SCHNORR_PUBLIC_KEY_SIZE ] ;
11331133 match from_hex ( s, & mut res) {
11341134 Ok ( constants:: SCHNORR_PUBLIC_KEY_SIZE ) =>
0 commit comments