@@ -328,7 +328,7 @@ fn infallible<T>(result: Result<T, CollectionAllocErr>) -> T {
328
328
}
329
329
330
330
/// FIXME: use `Layout::array` when we require a Rust version where it’s stable
331
- /// https://github.com/rust-lang/rust/issues/55724
331
+ /// < https://github.com/rust-lang/rust/issues/55724>
332
332
fn layout_array < T > ( n : usize ) -> Result < Layout , CollectionAllocErr > {
333
333
let size = mem:: size_of :: < T > ( )
334
334
. checked_mul ( n)
@@ -815,7 +815,7 @@ impl<A: Array> SmallVec<A> {
815
815
816
816
/// Construct a new `SmallVec` from a `Vec<A::Item>`.
817
817
///
818
- /// Elements will be copied to the inline buffer if vec.capacity() <= Self::inline_capacity().
818
+ /// Elements will be copied to the inline buffer if ` vec.capacity() <= Self::inline_capacity()` .
819
819
///
820
820
/// ```rust
821
821
/// use smallvec::SmallVec;
@@ -970,7 +970,7 @@ impl<A: Array> SmallVec<A> {
970
970
}
971
971
972
972
/// Returns a tuple with (data ptr, len, capacity)
973
- /// Useful to get all SmallVec properties with a single check of the current storage variant.
973
+ /// Useful to get all ` SmallVec` properties with a single check of the current storage variant.
974
974
#[ inline]
975
975
fn triple ( & self ) -> ( ConstNonNull < A :: Item > , usize , usize ) {
976
976
unsafe {
@@ -1475,7 +1475,7 @@ impl<A: Array> SmallVec<A> {
1475
1475
}
1476
1476
}
1477
1477
1478
- /// Convert a SmallVec to a Vec, without reallocating if the SmallVec has already spilled onto
1478
+ /// Convert a ` SmallVec` to a ` Vec` , without reallocating if the ` SmallVec` has already spilled onto
1479
1479
/// the heap.
1480
1480
pub fn into_vec ( mut self ) -> Vec < A :: Item > {
1481
1481
if self . spilled ( ) {
@@ -1498,10 +1498,10 @@ impl<A: Array> SmallVec<A> {
1498
1498
self . into_vec ( ) . into_boxed_slice ( )
1499
1499
}
1500
1500
1501
- /// Convert the SmallVec into an `A` if possible. Otherwise return `Err(Self)`.
1501
+ /// Convert the ` SmallVec` into an `A` if possible. Otherwise return `Err(Self)`.
1502
1502
///
1503
- /// This method returns `Err(Self)` if the SmallVec is too short (and the `A` contains uninitialized elements),
1504
- /// or if the SmallVec is too long (and all the elements were spilled to the heap).
1503
+ /// This method returns `Err(Self)` if the ` SmallVec` is too short (and the `A` contains uninitialized elements),
1504
+ /// or if the ` SmallVec` is too long (and all the elements were spilled to the heap).
1505
1505
pub fn into_inner ( self ) -> Result < A , Self > {
1506
1506
if self . spilled ( ) || self . len ( ) != A :: size ( ) {
1507
1507
// Note: A::size, not Self::inline_capacity
@@ -1595,15 +1595,15 @@ impl<A: Array> SmallVec<A> {
1595
1595
///
1596
1596
/// If `new_len` is greater than `len`, the `SmallVec` is extended by the difference, with each
1597
1597
/// additional slot filled with the result of calling the closure `f`. The return values from `f`
1598
- //// will end up in the `SmallVec` in the order they have been generated.
1598
+ /// will end up in the `SmallVec` in the order they have been generated.
1599
1599
///
1600
1600
/// If `new_len` is less than `len`, the `SmallVec` is simply truncated.
1601
1601
///
1602
1602
/// This method uses a closure to create new values on every push. If you'd rather `Clone` a given
1603
1603
/// value, use `resize`. If you want to use the `Default` trait to generate values, you can pass
1604
1604
/// `Default::default()` as the second argument.
1605
1605
///
1606
- /// Added for std::vec::Vec compatibility (added in Rust 1.33.0)
1606
+ /// Added for ` std::vec::Vec` compatibility (added in Rust 1.33.0)
1607
1607
///
1608
1608
/// ```
1609
1609
/// # use smallvec::{smallvec, SmallVec};
@@ -2321,7 +2321,7 @@ impl<'a, A: Array> IntoIterator for &'a mut SmallVec<A> {
2321
2321
}
2322
2322
}
2323
2323
2324
- /// Types that can be used as the backing store for a SmallVec
2324
+ /// Types that can be used as the backing store for a [` SmallVec`].
2325
2325
pub unsafe trait Array {
2326
2326
/// The type of the array's elements.
2327
2327
type Item ;
@@ -2331,7 +2331,7 @@ pub unsafe trait Array {
2331
2331
2332
2332
/// Set the length of the vec when the `SetLenOnDrop` value goes out of scope.
2333
2333
///
2334
- /// Copied from https://github.com/rust-lang/rust/pull/36355
2334
+ /// Copied from < https://github.com/rust-lang/rust/pull/36355>
2335
2335
struct SetLenOnDrop < ' a > {
2336
2336
len : & ' a mut usize ,
2337
2337
local_len : usize ,
0 commit comments