Skip to content

Commit 5359219

Browse files
Fix documentation issue
1 parent 932576d commit 5359219

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ pub use indexmap::{
8888
pub use indexset::{FnvIndexSet, IndexSet, Iter as IndexSetIter};
8989
pub use linear_map::LinearMap;
9090
pub use string::String;
91+
#[cfg(doc)]
92+
#[doc(hidden)]
93+
pub use vec::VecInner as _;
9194
pub use vec::{Vec, VecView};
9295

9396
#[macro_use]

src/vec.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ impl<T, const N: usize> VecDrop for [MaybeUninit<T>; N] {
3030
}
3131
}
3232

33+
/// <div class="warn">This is private API and should not be used</div>
3334
pub struct VecInner<B: ?Sized + VecDrop> {
3435
len: usize,
3536
buffer: B,
@@ -866,10 +867,12 @@ impl<T, const N: usize> Vec<T, N> {
866867
new
867868
}
868869

870+
/// Get a reference to the Vec, erasing the `N` const-generic
869871
pub const fn as_view(&self) -> &VecView<T> {
870872
self
871873
}
872874

875+
/// Get a `mut` reference to the Vec, erasing the `N` const-generic
873876
pub fn as_mut_view(&mut self) -> &mut VecView<T> {
874877
self
875878
}

0 commit comments

Comments
 (0)