Nit: add comment
This commit is contained in:
parent
1fdbfcdbd0
commit
883b969909
1 changed files with 5 additions and 3 deletions
|
@ -334,9 +334,11 @@ impl MultiSpan {
|
||||||
&self.primary_spans
|
&self.primary_spans
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the strings to highlight. If we have an explicit set,
|
/// Returns the strings to highlight. We always ensure that there
|
||||||
/// return those, otherwise just give back an (unlabeled) version
|
/// is an entry for each of the primary spans -- for each primary
|
||||||
/// of the primary span.
|
/// span P, if there is at least one label with span P, we return
|
||||||
|
/// those labels (marked as primary). But otherwise we return
|
||||||
|
/// `SpanLabel` instances with empty labels.
|
||||||
pub fn span_labels(&self) -> Vec<SpanLabel> {
|
pub fn span_labels(&self) -> Vec<SpanLabel> {
|
||||||
let is_primary = |span| self.primary_spans.contains(&span);
|
let is_primary = |span| self.primary_spans.contains(&span);
|
||||||
let mut span_labels = vec![];
|
let mut span_labels = vec![];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue