fn append_range(&mut self, range: OutputRange) {
        if !self.track_output_ranges {
            return;
        }

        assert!(range.start <= range.end);
        assert!(range.end <= self.buffer.len());

        // No text.
        if range.start == range.end {
            return;
        }

        // If this is appending more text from the same position, then just grow the
        // last range we pushed.
        if let Some(last_range) = self.buffer_pcs.last_mut() {
            assert!(range.start >= last_range.end);

            if last_range.await_pc == range.await_pc
                && last_range.end == range.start
                && last_range.end < range.end
            {
                last_range.end = range.end;
                return;
            }
        }

        // Else push a new range.
        self.buffer_pcs.push(range);
    }
/// Append text into the output buffer
Append text into the output buffer
Append text into the output buffer
fn append_range(&mut self, range: OutputRange) {
        if !self.track_output_ranges {
            return;
        }
        assert!(range.start <= range.end);
        assert!(range.end <= self.buffer.len());
        // No text.
        if range.start == range.end {
            return;
        }
        // If this is appending more text from the same position, then just grow the
        // last range we pushed.
        if let Some(last_range) = self.buffer_pcs.last_mut() {
            assert!(range.start >= last_range.end);
            if last_range.await_pc == range.await_pc
                && last_range.end == range.start
                && last_range.end < range.end
            {
                last_range.end = range.end;
                return;
            }
        }
        // Else push a new range.
        self.buffer_pcs.push(range);
    }
fn append_range ( & mut self , range : OutputRange ) { if ! self . track_output_ranges { return ; } assert ! ( range start range end ) ; assert ! ( range end self buffer len ( ) ) ; // No text. if range . start == range . end { return ; } // If this is appending more text from the same position, then just grow the // last range we pushed. if let Some ( last_range ) = self . buffer_pcs . last_mut ( ) { assert ! ( range start last_range end ) ; if last_range . await_pc == range . await_pc && last_range . end == range . start && last_range . end < range . end { last_range . end = range . end ; return ; } } // Else push a new range. self . buffer_pcs . push ( range ) ; }
Append text into the output buffer
Append text into the output buffer
&mut self
range
OutputRange
&mut self
range
OutputRange