pub fn sweep(&mut self) {
        assert!(self.phase == Phase::MARKED);
        self.iter().filter(|span| span.span_type == SpanType::Color(self.current_color.opposite())).for_each(|span| {
            let m = Memory::from_addresses(span.start, span.end);
            span.free_list_span.insert(m);
        });
        self.phase = Phase::QUIET;
    }
/// Sweep through the heap and move every un-marked span of memory into
/// the free list. This is the 2nd and final phase of garbage collection.
Sweep through the heap and move every un-marked span of memory into
the free list. This is the 2nd and final phase of garbage collection.
Sweep through the heap and move every un - marked span of memory into the free list . This is the 2nd and final phase of garbage collection .
pub fn sweep(&mut self) {
        assert!(self.phase == Phase::MARKED);
        self.iter().filter(|span| span.span_type == SpanType::Color(self.current_color.opposite())).for_each(|span| {
            let m = Memory::from_addresses(span.start, span.end);
            span.free_list_span.insert(m);
        });
        self.phase = Phase::QUIET;
    }
pub fn sweep ( & mut self ) { assert ! ( self phase Phase MARKED ) ; self . iter ( ) . filter ( | span | span . span_type == SpanType :: Color ( self . current_color . opposite ( ) ) ) . for_each ( | span | { let m = Memory :: from_addresses ( span . start , span . end ) ; span . free_list_span . insert ( m ) ; } ) ; self . phase = Phase :: QUIET ; }
Sweep through the heap and move every un-marked span of memory into
the free list.
Sweep through the heap and move every un - marked span of memory into the free list .
&mut self
&mut self