pub fn new(size: usize) -> Pool<T> {
        assert!(size > 0);
        Pool { pool: (0..size).map(|i| Slot::Free((i as isize) - 1)).collect(),
               freelist: (size - 1) as isize,
               used: 0 }
    }
/// Create a new pool with a given size.
Create a new pool with a given size.
Create a new pool with a given size .
pub fn new(size: usize) -> Pool<T> {
        assert!(size > 0);
        Pool { pool: (0..size).map(|i| Slot::Free((i as isize) - 1)).collect(),
               freelist: (size - 1) as isize,
               used: 0 }
    }
pub fn new ( size : usize ) -> Pool < T > { assert ! ( size 0 ) ; Pool { pool : ( 0 .. size ) . map ( | i | Slot :: Free ( ( i as isize ) - 1 ) ) . collect ( ) , freelist : ( size - 1 ) as isize , used : 0 } }
Create a new pool with a given size.
Create a new pool with a given size .
size
usize
size
usize