Skip to content

Commit d2f3354

Browse files
committed
Fix some missing docs.
1 parent 2e5e0f1 commit d2f3354

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

atom/src/space/vec.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,22 @@ impl<T: Copy + 'static> AlignedVec<T> {
131131
}
132132
}
133133

134+
///! Converts the aligned buffer into an [`AlignedSpace`](crate::space::AlignedSpace).
135+
///
136+
/// This is similar in spirit to [`Vec::into_boxed_slice`], but keeps the alignment invariants
137+
/// enforced.
134138
#[inline]
135139
pub fn into_boxed_space(self) -> Box<AlignedSpace<T>> {
136140
AlignedSpace::from_boxed_uninit_slice(self.inner.into_boxed_slice())
137141
}
138142

143+
/// Converts the aligned buffer into the inner `Vec<MaybeUninit<T>>`.
139144
#[inline]
140145
pub fn into_vec(self) -> Vec<MaybeUninit<T>> {
141146
self.inner
142147
}
143148

149+
/// Creates a new aligned buffer by wrapping an existing `Vec<MaybeUninit<T>>`.
144150
#[inline]
145151
pub fn from_vec(vec: Vec<MaybeUninit<T>>) -> Self {
146152
Self { inner: vec }

0 commit comments

Comments
 (0)