move stuff around a bit
This commit is contained in:
parent
0f07d10c29
commit
c496ba0009
25
src/lib.rs
25
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<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.
|
||||
///
|
||||
/// See [`std::vec::Vec`] (the standard library `Vec` type) for more information.
|
||||
|
@ -175,11 +183,6 @@ pub struct DynVec<T: ?Sized> {
|
|||
_phantom: PhantomData<T>,
|
||||
}
|
||||
|
||||
// keeps this file cleaner
|
||||
mod impls;
|
||||
mod iter;
|
||||
pub use iter::*;
|
||||
|
||||
/// The extra data stored at the end of the allocation.
|
||||
type Extra<T> = *const T;
|
||||
|
||||
|
|
Loading…
Reference in a new issue