v1.0.1
Fixed issue where the wrapped "Int" member of "Prime" was marked as private, rather than public.
This commit is contained in:
parent
a60c1f63a1
commit
bc91896510
3 changed files with 7 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "pumpkin"
|
||||
version = "1.0.0"
|
||||
version = "1.0.1"
|
||||
authors = ["Zach Dziura <zcdziura@gmail.com>"]
|
||||
description = "A cryptographically secure prime number generator"
|
||||
repository = "https://github.com/zcdziura/pumpkin"
|
||||
|
|
|
@ -60,6 +60,11 @@ mod tests {
|
|||
Prime::from_rng(511, &mut rngesus);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_should_destructure() {
|
||||
let Prime(n) = Prime::new(512);
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_generate_512_bit_prime(b: &mut Bencher) {
|
||||
b.iter(|| Prime::new(512));
|
||||
|
|
|
@ -137,7 +137,7 @@ custom_derive! {
|
|||
NewtypeBitAnd(Int), NewtypeBitOr, NewtypeBitOr(Int), NewtypeBitXor,
|
||||
NewtypeBitXor(Int)
|
||||
)]
|
||||
pub struct Prime(Int);
|
||||
pub struct Prime(pub Int);
|
||||
}
|
||||
|
||||
impl Prime {
|
||||
|
|
Loading…
Add table
Reference in a new issue