2016-04-26 12:51:14 -05:00
|
|
|
#[derive(Copy)]
|
|
|
|
pub struct U256(pub [u64; 4]);
|
|
|
|
|
|
|
|
impl Clone for U256 {
|
|
|
|
fn clone(&self) -> U256 {
|
|
|
|
*self
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl U256 {
|
|
|
|
pub fn new(value: u64) -> U256 {
|
|
|
|
let mut ret = [0; 4];
|
|
|
|
ret[0] = value;
|
|
|
|
U256(ret)
|
|
|
|
}
|
2015-03-18 16:05:24 -05:00
|
|
|
}
|