Skip to content

Commit

Permalink
improve size related traits
Browse files Browse the repository at this point in the history
- rename `Size` trait to `DataSize`.
  - new associated consts `BITS`, `BYTES`, `UBYTES`, `UBITS`.
  - remove unnecessary methods.
- new generic traits: `Bitsize`, `BitSizeAtLeast`, `BitSizeAtMost`.
- implement on most of the Rust primitives.
- improve docs and refactor the `mem` module.
  • Loading branch information
joseluis committed Jul 26, 2023
1 parent e81da62 commit 779143d
Show file tree
Hide file tree
Showing 5 changed files with 438 additions and 56 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ pub mod unit;
/// Everything is re-exported from here.
pub mod all {
#[doc(inline)]
pub use super::{error::*, grid::*, list::all::*, mem::*, misc::*, unit::all::*};
pub use super::{error::*, grid::*, list::all::*, mem::all::*, misc::*, unit::all::*};
}
2 changes: 1 addition & 1 deletion src/list/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ pub mod stack;
pub use all::*;
pub(crate) mod all {
#[doc(inline)]
pub use super::{bit_array::all::*, array::all::*, deque::*, linked::*, queue::*, stack::*};
pub use super::{array::all::*, bit_array::all::*, deque::*, linked::*, queue::*, stack::*};
}
Loading

0 comments on commit 779143d

Please sign in to comment.