pub fn map<F, U>(mut self, mut f: F) -> Arena<U>
    where
        F: FnMut(T) -> U,
    {
        use Entry::*;
        Arena {
            storage: self
                .storage
                .drain(..)
                .map(|entry| match entry {
                    Occupied(OccupiedEntry { generation, value }) => Occupied(OccupiedEntry {
                        generation,
                        value: f(value),
                    }),
                    Empty(empty) => Empty(empty),
                })
                .collect(),
            len: self.len,
            first_free: self.first_free,
        }
    }
/// Returns an arena with identical indexing and function `f` applied to each value.
Returns an arena with identical indexing and function `f` applied to each value.
Returns an arena with identical indexing and function ` f ` applied to each value .
pub fn map<F, U>(mut self, mut f: F) -> Arena<U>
    where
        F: FnMut(T) -> U,
    {
        use Entry::*;
        Arena {
            storage: self
                .storage
                .drain(..)
                .map(|entry| match entry {
                    Occupied(OccupiedEntry { generation, value }) => Occupied(OccupiedEntry {
                        generation,
                        value: f(value),
                    }),
                    Empty(empty) => Empty(empty),
                })
                .collect(),
            len: self.len,
            first_free: self.first_free,
        }
    }
pub fn map < F , U > ( mut self , mut f : F ) -> Arena < U > where F : FnMut ( T ) -> U , { use Entry :: * ; Arena { storage : self . storage . drain ( .. ) . map ( | entry | match entry { Occupied ( OccupiedEntry { generation , value } ) => Occupied ( OccupiedEntry { generation , value : f ( value ) , } ) , Empty ( empty ) => Empty ( empty ) , } ) . collect ( ) , len : self . len , first_free : self . first_free , } }
Returns an arena with identical indexing and function `f` applied to each value.
Returns an arena with identical indexing and function ` f ` applied to each value .
mut self
f
F
mut self
f
F