Merge pull request #1 from steveklabnik/master
Fix unused imports and add a gitignore
This commit is contained in:
commit
2c2a98a153
|
@ -0,0 +1,2 @@
|
|||
target/
|
||||
Cargo.lock
|
|
@ -4,14 +4,12 @@
|
|||
#![crate_name = "bitcoin-secp256k1-rs"]
|
||||
#![comment = "Bindings and wrapper functions for bitcoin secp256k1 library."]
|
||||
#![feature(phase)]
|
||||
#![feature(globs)] // for tests only
|
||||
|
||||
|
||||
extern crate libc;
|
||||
extern crate sync;
|
||||
|
||||
use std::rand;
|
||||
use std::rand::Rng;
|
||||
|
||||
use libc::{c_int, c_uchar};
|
||||
use sync::one::{Once, ONCE_INIT};
|
||||
|
||||
|
@ -252,6 +250,14 @@ impl Secp256k1 {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
|
||||
use std::rand;
|
||||
use std::rand::Rng;
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn invalid_pubkey() {
|
||||
let s = Secp256k1::new();
|
||||
|
@ -369,5 +375,4 @@ fn sign_compact_with_recovery() {
|
|||
|
||||
assert_eq!(s.recover_compact(msg.as_slice(), sig.as_slice(), &mut pubkey, recid), Ok(()));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue