Remove side-effect from assertion; add release build to travis
This commit is contained in:
parent
d35168d626
commit
9a91b69fad
|
@ -15,7 +15,9 @@ install:
|
|||
script:
|
||||
- |
|
||||
travis-cargo build &&
|
||||
travis-cargo build --release &&
|
||||
travis-cargo test &&
|
||||
travis-cargo test --release &&
|
||||
travis-cargo bench &&
|
||||
travis-cargo --only stable doc
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
|
||||
name = "secp256k1"
|
||||
version = "0.5.0"
|
||||
version = "0.5.1"
|
||||
authors = [ "Dawid Ciężarkiewicz <dpc@ucore.info>",
|
||||
"Andrew Poelstra <apoelstra@wpsoftware.net>" ]
|
||||
license = "CC0-1.0"
|
||||
|
|
|
@ -161,9 +161,10 @@ impl PublicKey {
|
|||
unsafe {
|
||||
let mut ret_len = ret.len() as ::libc::size_t;
|
||||
let compressed = if compressed { ffi::SECP256K1_SER_COMPRESSED } else { ffi::SECP256K1_SER_UNCOMPRESSED };
|
||||
debug_assert!(ffi::secp256k1_ec_pubkey_serialize(secp.ctx, ret.as_ptr(),
|
||||
&mut ret_len, self.as_ptr(),
|
||||
compressed) == 1);
|
||||
let err = ffi::secp256k1_ec_pubkey_serialize(secp.ctx, ret.as_ptr(),
|
||||
&mut ret_len, self.as_ptr(),
|
||||
compressed);
|
||||
debug_assert_eq!(err, 1);
|
||||
ret.set_len(ret_len as usize);
|
||||
}
|
||||
ret
|
||||
|
|
Loading…
Reference in New Issue