coverage: Rename check_pending_dups
to maybe_flush_pending_dups
This method's main responsibility is to flush the pending dups into refined spans, if appropriate.
This commit is contained in:
parent
46c545c1ba
commit
9b6ce4fb3c
1 changed files with 2 additions and 2 deletions
|
@ -462,7 +462,7 @@ impl<'a> CoverageSpansGenerator<'a> {
|
||||||
/// `pending_dups` could have as few as one span)
|
/// `pending_dups` could have as few as one span)
|
||||||
/// In either case, no more spans will match the span of `pending_dups`, so
|
/// In either case, no more spans will match the span of `pending_dups`, so
|
||||||
/// add the `pending_dups` if they don't overlap `curr`, and clear the list.
|
/// add the `pending_dups` if they don't overlap `curr`, and clear the list.
|
||||||
fn check_pending_dups(&mut self) {
|
fn maybe_flush_pending_dups(&mut self) {
|
||||||
if let Some(dup) = self.pending_dups.last()
|
if let Some(dup) = self.pending_dups.last()
|
||||||
&& dup.span != self.prev().span
|
&& dup.span != self.prev().span
|
||||||
{
|
{
|
||||||
|
@ -502,7 +502,7 @@ impl<'a> CoverageSpansGenerator<'a> {
|
||||||
// by `self.curr_mut().merge_from(prev)`.
|
// by `self.curr_mut().merge_from(prev)`.
|
||||||
self.curr_original_span = curr.span;
|
self.curr_original_span = curr.span;
|
||||||
self.some_curr.replace(curr);
|
self.some_curr.replace(curr);
|
||||||
self.check_pending_dups();
|
self.maybe_flush_pending_dups();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue