Export U256 and U512
This commit is contained in:
parent
85ba498a4b
commit
97ecf175c8
|
@ -12,9 +12,9 @@ byteorder = { version = "1", default-features = false }
|
|||
heapsize = { version = "0.4.2", optional = true }
|
||||
rustc-hex = { version = "2.0", default-features = false }
|
||||
quickcheck = { version = "0.6", optional = true }
|
||||
crunchy = "0.1"
|
||||
|
||||
[dev-dependencies]
|
||||
crunchy = "0.1.5"
|
||||
quickcheck = "0.6"
|
||||
rustc-hex = "2.0"
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# Big unsigned integer types
|
||||
|
||||
Implementation of a various large-but-fixed sized unsigned integer types.
|
||||
The functions here are designed to be fast. There are optional `x86_64`
|
||||
implementations for even more speed, hidden behind the `x64_arithmetic`
|
||||
feature flag.
|
||||
The functions here are designed to be fast.
|
||||
|
||||
The crate exports two commonly used types: `U256` and `U512`. Other sizes can be constructed with `construct_uint!(NAME, SIZE_IN_WORDS)`, e.g. `construct_uint!(U128, 2);`.
|
||||
|
||||
Run tests with `cargo test --features=std,impl_quickcheck_arbitrary`.
|
|
@ -32,5 +32,8 @@ pub extern crate quickcheck;
|
|||
#[cfg(all(not(feature = "std"), test))]
|
||||
extern crate alloc;
|
||||
|
||||
#[macro_use]
|
||||
extern crate crunchy;
|
||||
|
||||
mod uint;
|
||||
pub use uint::*;
|
||||
|
|
|
@ -1367,3 +1367,6 @@ macro_rules! impl_quickcheck_arbitrary_for_uint {
|
|||
macro_rules! impl_quickcheck_arbitrary_for_uint {
|
||||
($uint: ty, $n_bytes: tt) => {}
|
||||
}
|
||||
|
||||
construct_uint!(U256, 4);
|
||||
construct_uint!(U512, 8);
|
|
@ -10,11 +10,9 @@ extern crate quickcheck;
|
|||
|
||||
use core::u64::MAX;
|
||||
use core::str::FromStr;
|
||||
use uint::FromDecStrErr;
|
||||
use uint::{U256, U512, FromDecStrErr};
|
||||
|
||||
construct_uint!(U128, 2);
|
||||
construct_uint!(U256, 4);
|
||||
construct_uint!(U512, 8);
|
||||
|
||||
#[test]
|
||||
fn uint256_checked_ops() {
|
||||
|
|
Loading…
Reference in New Issue