Skip to content

Commit

Permalink
Add prelude module (#45)
Browse files Browse the repository at this point in the history
Makes it simple to import traits used by this crate
  • Loading branch information
tarcieri authored Nov 14, 2021
1 parent 1535534 commit 8f17162
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ pub(crate) use limb::{LimbInt, WideLimbInt};

#[cfg(feature = "generic-array")]
pub use {
self::array::{ArrayDecoding, ArrayEncoding, ByteArray},
crate::array::{ArrayDecoding, ArrayEncoding, ByteArray},
generic_array::{self, typenum::consts},
};

Expand All @@ -179,3 +179,11 @@ pub use rlp;

#[cfg(feature = "zeroize")]
pub use zeroize;

/// Import prelude for this crate: includes important traits.
pub mod prelude {
pub use crate::traits::*;

#[cfg(feature = "generic-array")]
pub use crate::array::{ArrayDecoding, ArrayEncoding};
}

0 comments on commit 8f17162

Please sign in to comment.