diff --git a/src/lib.rs b/src/lib.rs index 70d1e20..bb2d115 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -124,9 +124,12 @@ //! [`unsize`]: DynVec::unsize //! [`unsize_stable`]: DynVec::unsize_stable -#![cfg_attr(feature = "unstable", feature(coerce_unsized))] -#![cfg_attr(feature = "unstable", feature(set_ptr_value))] -#![cfg_attr(feature = "unstable", feature(pointer_byte_offsets))] +#![cfg_attr( + feature = "unstable", + feature(coerce_unsized), + feature(set_ptr_value), + feature(pointer_byte_offsets) +)] #![warn(missing_docs)] #![warn(clippy::pedantic)] #![warn(clippy::nursery)] @@ -139,6 +142,14 @@ mod bench; #[cfg(test)] mod test; +mod impls; +mod iter; + +mod ptr_ext; +use ptr_ext::{ConstPtrExt, MutPtrExt, PtrExt}; + +pub use iter::*; + // TODO: maybe remove this? Its not that many imports /// Prelude, suitable for glob imports. pub mod prelude { @@ -161,9 +172,6 @@ use std::ops::CoerceUnsized; type Coercer = for<'a> fn(&'a T) -> &'a U; -mod ptr_ext; -use ptr_ext::{ConstPtrExt, MutPtrExt, PtrExt}; - /// A heap allocated, dynamic length collection of `?Sized` elements. /// /// See [`std::vec::Vec`] (the standard library `Vec` type) for more information. @@ -175,11 +183,6 @@ pub struct DynVec { _phantom: PhantomData, } -// keeps this file cleaner -mod impls; -mod iter; -pub use iter::*; - /// The extra data stored at the end of the allocation. type Extra = *const T;