pub fn with_capacity(n: usize) -> Arena<T> {
        let n = cmp::max(n, 1);
        let mut arena = Arena {
            items: Vec::new(),
            generation: 0,
            free_list_head: None,
            len: 0,
        };
        arena.reserve(n);
        arena
    }
/// Constructs a new, empty `Arena<T>` with the specified capacity.
///
/// The `Arena<T>` will be able to hold `n` elements without further allocation.
///
/// # Examples
///
/// ```ignore
/// use rapier::data::arena::Arena;
///
/// let mut arena = Arena::with_capacity(10);
///
/// // These insertions will not require further allocation.
/// for i in 0..10 {
///     assert!(arena.try_insert(i).is_ok());
/// }
///
/// // But now we are at capacity, and there is no more room.
/// assert!(arena.try_insert(99).is_err());
/// ```
Constructs a new, empty `Arena` with the specified capacity.
The `Arena` will be able to hold `n` elements without further allocation.
Constructs a new empty ` Arena ` with the specified capacity . The ` Arena ` will be able to hold ` n ` elements without further allocation .
pub fn with_capacity(n: usize) -> Arena<T> {
        let n = cmp::max(n, 1);
        let mut arena = Arena {
            items: Vec::new(),
            generation: 0,
            free_list_head: None,
            len: 0,
        };
        arena.reserve(n);
        arena
    }
pub fn with_capacity ( n : usize ) -> Arena < T > { let n = cmp :: max ( n , 1 ) ; let mut arena = Arena { items : Vec :: new ( ) , generation : 0 , free_list_head : None , len : 0 , } ; arena . reserve ( n ) ; arena }
Constructs a new, empty `Arena<T>` with the specified capacity.
Constructs a new empty ` Arena<T > ` with the specified capacity .
n
usize
examples
```ignore
use rapier::data::arena::Arena.

let mut arena = Arena::with_capacity(10).

These insertions will not require further allocation.

But now we are at capacity, and there is no more room.
` ` ` ignore use rapier :: data :: arena :: Arena . let mut arena = Arena :: with_capacity ( 10 ) . These insertions will not require further allocation . But now we are at capacity and there is no more room .