Skip to content

Commit

Permalink
fix minor documentation issue and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
nlordell committed Feb 22, 2022
1 parent 5bd24b7 commit 0f708d8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ethnum"
version = "1.1.0"
version = "1.1.1"
authors = ["Nicholas Rodrigues Lordello <[email protected]>"]
edition = "2021"
description = "256-bit unsigned integer implementation"
Expand Down
6 changes: 1 addition & 5 deletions src/int.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
12 changes: 10 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
4 changes: 0 additions & 4 deletions src/uint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 0f708d8

Please sign in to comment.