From 0f708d869e0e17e6a251c72ab9b68d4292e964dd Mon Sep 17 00:00:00 2001 From: Nicholas Rodrigues Lordello Date: Tue, 22 Feb 2022 19:55:03 +0100 Subject: [PATCH] fix minor documentation issue and bump version --- Cargo.toml | 2 +- src/int.rs | 6 +----- src/lib.rs | 12 ++++++++++-- src/uint.rs | 4 ---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ca26d39..4d47902 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ethnum" -version = "1.1.0" +version = "1.1.1" authors = ["Nicholas Rodrigues Lordello "] edition = "2021" description = "256-bit unsigned integer implementation" diff --git a/src/int.rs b/src/int.rs index e1b89db..55a455d 100644 --- a/src/int.rs +++ b/src/int.rs @@ -10,15 +10,11 @@ mod ops; pub use self::convert::AsI256; use crate::uint::U256; -/// A 256-bit unsigned integer type. +/// A 256-bit signed integer type. #[derive(Clone, Copy, Default, Eq, Hash, PartialEq)] #[repr(transparent)] pub struct I256(pub [i128; 2]); -/// A 256-bit unsigned integer type. -#[allow(non_camel_case_types)] -pub type i256 = I256; - impl I256 { /// The additive identity for this integer type, i.e. `0`. pub const ZERO: Self = I256([0; 2]); diff --git a/src/lib.rs b/src/lib.rs index 68815b0..687f69d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -28,10 +28,18 @@ mod int; pub mod intrinsics; mod uint; -pub use self::{int::*, uint::*}; - /// Convenience re-export of 256-integer types and as- conversion traits. pub mod prelude { pub use crate::int::{AsI256, I256}; pub use crate::uint::{AsU256, U256}; } + +pub use self::prelude::*; + +/// A 256-bit signed integer type. +#[allow(non_camel_case_types)] +pub type i256 = I256; + +/// A 256-bit unsigned integer type. +#[allow(non_camel_case_types)] +pub type u256 = U256; diff --git a/src/uint.rs b/src/uint.rs index 75f8cef..479937f 100644 --- a/src/uint.rs +++ b/src/uint.rs @@ -15,10 +15,6 @@ use crate::I256; #[repr(transparent)] pub struct U256(pub [u128; 2]); -/// A 256-bit unsigned integer type. -#[allow(non_camel_case_types)] -pub type u256 = U256; - impl U256 { /// The additive identity for this integer type, i.e. `0`. pub const ZERO: Self = U256([0; 2]);