From f6f9581638ebca7fb44d236ff654737ea2c2253f Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Fri, 16 Oct 2020 05:47:33 -0700 Subject: [PATCH] cipher: re-export `generic_array` from toplevel ...along with `typenum::consts` Failure to do this was an oversight: it doesn't really make sense to re-export these twice from both the `block` and `stream` modules. That said, `cipher` v0.2 is already shipped, and it does ease a sed-based migration to keep these re-exports for now. This commit adds a third re-export from the toplevel, and comments to remove the re-exports from the `block` and `stream` crates. This should happen before `cipher` v0.3 is released. --- cipher/src/block.rs | 2 ++ cipher/src/lib.rs | 1 + cipher/src/stream.rs | 2 ++ 3 files changed, 5 insertions(+) diff --git a/cipher/src/block.rs b/cipher/src/block.rs index 8cf1fb1e4..7289561fd 100644 --- a/cipher/src/block.rs +++ b/cipher/src/block.rs @@ -16,6 +16,8 @@ pub mod dev; mod errors; pub use errors::InvalidKeyLength; + +// TODO(tarcieri): remove these re-exports in favor of the toplevel one pub use generic_array::{self, typenum::consts}; use generic_array::{typenum::Unsigned, ArrayLength, GenericArray}; diff --git a/cipher/src/lib.rs b/cipher/src/lib.rs index 771ac533e..036707e71 100644 --- a/cipher/src/lib.rs +++ b/cipher/src/lib.rs @@ -23,3 +23,4 @@ pub use crate::{ block::{BlockCipher, BlockCipherMut, NewBlockCipher}, stream::{NewStreamCipher, StreamCipher, SyncStreamCipher, SyncStreamCipherSeek}, }; +pub use generic_array::{self, typenum::consts}; diff --git a/cipher/src/stream.rs b/cipher/src/stream.rs index aba220b53..ebc022c5c 100644 --- a/cipher/src/stream.rs +++ b/cipher/src/stream.rs @@ -9,6 +9,8 @@ mod dev; mod errors; pub use errors::{InvalidKeyNonceLength, LoopError, OverflowError}; + +// TODO(tarcieri): remove these re-exports in favor of the toplevel one pub use generic_array::{self, typenum::consts}; #[cfg(feature = "dev")]