File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -334,9 +334,11 @@ impl MultiSpan {
334
334
& self . primary_spans
335
335
}
336
336
337
- /// Returns the strings to highlight. If we have an explicit set,
338
- /// return those, otherwise just give back an (unlabeled) version
339
- /// of the primary span.
337
+ /// Returns the strings to highlight. We always ensure that there
338
+ /// is an entry for each of the primary spans -- for each primary
339
+ /// span P, if there is at least one label with span P, we return
340
+ /// those labels (marked as primary). But otherwise we return
341
+ /// `SpanLabel` instances with empty labels.
340
342
pub fn span_labels ( & self ) -> Vec < SpanLabel > {
341
343
let is_primary = |span| self . primary_spans . contains ( & span) ;
342
344
let mut span_labels = vec ! [ ] ;
You can’t perform that action at this time.
0 commit comments