diff --git a/src/lib.rs b/src/lib.rs index 4aaa579..858e996 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -60,6 +60,12 @@ extern crate std; mod tests; mod pemfile; +#[cfg(feature = "std")] +use core::iter; +/// --- Legacy APIs: +#[cfg(feature = "std")] +use std::io; + #[cfg(feature = "std")] pub use pemfile::{read_all, read_one}; pub use pemfile::{read_one_from_slice, Error, Item}; @@ -71,12 +77,6 @@ use pki_types::{ PrivatePkcs8KeyDer, PrivateSec1KeyDer, SubjectPublicKeyInfoDer, }; -#[cfg(feature = "std")] -use core::iter; -/// --- Legacy APIs: -#[cfg(feature = "std")] -use std::io; - /// Return an iterator over certificates from `rd`. /// /// Filters out any PEM sections that are not certificates and yields errors if a problem