Skip to content

Commit

Permalink
Inline RawVec::cap
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrubeck committed May 9, 2016
1 parent af0a433 commit 06f5fa4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/liballoc/raw_vec.rs
Expand Up @@ -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
Expand Down

0 comments on commit 06f5fa4

Please sign in to comment.