// Returns the largest prefix of the given range such that all pages there have
// not been marked yet.
Returns the largest prefix of the given range such that all pages there have
not been marked yet.
Returns the largest prefix of the given range such that all pages there have not been marked yet .
fn restrict_range_to_unmarked(&self, range: Range<PageIndex>) -> Range<PageIndex> {
        let range = range_intersection(&range, &self.page_range());
        let start = range.start.get() as usize;
        let old_end = range.end.get() as usize;
        let mut end = start;
        while end < old_end {
            if self.pages.get(end).unwrap_or(true) {
                break;
            }
            end += 1;
        }
        Range {
            start: PageIndex::new(start as u64),
            end: PageIndex::new(end as u64),
        }
    }
fn restrict_range_to_unmarked ( & self , range : Range < PageIndex > ) -> Range < PageIndex > { let range = range_intersection ( & range , & self . page_range ( ) ) ; let start = range . start . get ( ) as usize ; let old_end = range . end . get ( ) as usize ; let mut end = start ; while end < old_end { if self . pages . get ( end ) . unwrap_or ( true ) { break ; } end += 1 ; } Range { start : PageIndex :: new ( start as u64 ) , end : PageIndex :: new ( end as u64 ) , } }
Returns the largest prefix of the given range such that all pages there have
not been marked yet.
Returns the largest prefix of the given range such that all pages there have not been marked yet .
&self
range
Range<PageIndex>