move stuff around a bit

This commit is contained in:
missing 2022-09-09 13:11:49 -05:00
parent 0f07d10c29
commit c496ba0009

View file

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