Rollup merge of #33522 - mbrubeck:inline-rawvec-cap, r=nagisa
Inline RawVec::cap This was showing up in a Servo profile.
This commit is contained in:
commit
30df9d0201
@ -147,6 +147,7 @@ impl<T> RawVec<T> {
|
||||
/// Gets the capacity of the allocation.
|
||||
///
|
||||
/// This will always be `usize::MAX` if `T` is zero-sized.
|
||||
#[inline(always)]
|
||||
pub fn cap(&self) -> usize {
|
||||
if mem::size_of::<T>() == 0 {
|
||||
!0
|
||||
|
Loading…
x
Reference in New Issue
Block a user