@@ -219,13 +219,13 @@ impl PublicKey {
219219 /// Obtains a raw const pointer suitable for use with FFI functions
220220 #[ inline]
221221 pub fn as_ptr ( & self ) -> * const ffi:: PublicKey {
222- & self . 0 as * const _
222+ & self . 0
223223 }
224224
225225 /// Obtains a raw mutable pointer suitable for use with FFI functions
226226 #[ inline]
227227 pub fn as_mut_ptr ( & mut self ) -> * mut ffi:: PublicKey {
228- & mut self . 0 as * mut _
228+ & mut self . 0
229229 }
230230
231231 /// Creates a new public key from a secret key.
@@ -313,7 +313,7 @@ impl PublicKey {
313313 secp : & Secp256k1 < C >
314314 ) {
315315 unsafe {
316- let res = ffi:: secp256k1_ec_pubkey_negate ( secp. ctx , & mut self . 0 as * mut _ ) ;
316+ let res = ffi:: secp256k1_ec_pubkey_negate ( secp. ctx , & mut self . 0 ) ;
317317 debug_assert_eq ! ( res, 1 ) ;
318318 }
319319 }
@@ -331,8 +331,7 @@ impl PublicKey {
331331 return Err ( Error :: InvalidTweak ) ;
332332 }
333333 unsafe {
334- if ffi:: secp256k1_ec_pubkey_tweak_add ( secp. ctx , & mut self . 0 as * mut _ ,
335- other. as_c_ptr ( ) ) == 1 {
334+ if ffi:: secp256k1_ec_pubkey_tweak_add ( secp. ctx , & mut self . 0 , other. as_c_ptr ( ) ) == 1 {
336335 Ok ( ( ) )
337336 } else {
338337 Err ( Error :: InvalidTweak )
@@ -353,8 +352,7 @@ impl PublicKey {
353352 return Err ( Error :: InvalidTweak ) ;
354353 }
355354 unsafe {
356- if ffi:: secp256k1_ec_pubkey_tweak_mul ( secp. ctx , & mut self . 0 as * mut _ ,
357- other. as_c_ptr ( ) ) == 1 {
355+ if ffi:: secp256k1_ec_pubkey_tweak_mul ( secp. ctx , & mut self . 0 , other. as_c_ptr ( ) ) == 1 {
358356 Ok ( ( ) )
359357 } else {
360358 Err ( Error :: InvalidTweak )
0 commit comments