@@ -219,13 +219,13 @@ impl PublicKey {
219
219
/// Obtains a raw const pointer suitable for use with FFI functions
220
220
#[ inline]
221
221
pub fn as_ptr ( & self ) -> * const ffi:: PublicKey {
222
- & self . 0 as * const _
222
+ & self . 0
223
223
}
224
224
225
225
/// Obtains a raw mutable pointer suitable for use with FFI functions
226
226
#[ inline]
227
227
pub fn as_mut_ptr ( & mut self ) -> * mut ffi:: PublicKey {
228
- & mut self . 0 as * mut _
228
+ & mut self . 0
229
229
}
230
230
231
231
/// Creates a new public key from a secret key.
@@ -313,7 +313,7 @@ impl PublicKey {
313
313
secp : & Secp256k1 < C >
314
314
) {
315
315
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 ) ;
317
317
debug_assert_eq ! ( res, 1 ) ;
318
318
}
319
319
}
@@ -331,8 +331,7 @@ impl PublicKey {
331
331
return Err ( Error :: InvalidTweak ) ;
332
332
}
333
333
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 {
336
335
Ok ( ( ) )
337
336
} else {
338
337
Err ( Error :: InvalidTweak )
@@ -353,8 +352,7 @@ impl PublicKey {
353
352
return Err ( Error :: InvalidTweak ) ;
354
353
}
355
354
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 {
358
356
Ok ( ( ) )
359
357
} else {
360
358
Err ( Error :: InvalidTweak )
0 commit comments