Skip to content

Commit 06f5fa4

Browse files
committed
Inline RawVec::cap
1 parent af0a433 commit 06f5fa4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/liballoc/raw_vec.rs

+1
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ impl<T> RawVec<T> {
147147
/// Gets the capacity of the allocation.
148148
///
149149
/// This will always be `usize::MAX` if `T` is zero-sized.
150+
#[inline(always)]
150151
pub fn cap(&self) -> usize {
151152
if mem::size_of::<T>() == 0 {
152153
!0

0 commit comments

Comments
 (0)