Skip to content

Commit 30df9d0

Browse files
committed
Rollup merge of rust-lang#33522 - mbrubeck:inline-rawvec-cap, r=nagisa
Inline RawVec::cap This was showing up in a Servo profile.
2 parents 4fe7871 + 06f5fa4 commit 30df9d0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/liballoc/raw_vec.rs

Lines changed: 1 addition & 0 deletions
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)