Revert "Remove unused methods from MultiSpan"

This reverts commit f7019a4e2f.

This removed the only way to make a suggestion with more than one
substitute. Bring it back until we come up with a better solution.
This commit is contained in:
mcarton 2016-07-28 19:33:31 +02:00
parent cec262e55a
commit 6dc98cf099

View File

@ -193,6 +193,20 @@ impl MultiSpan {
}
}
pub fn from_span(primary_span: Span) -> MultiSpan {
MultiSpan {
primary_spans: vec![primary_span],
span_labels: vec![]
}
}
pub fn from_spans(vec: Vec<Span>) -> MultiSpan {
MultiSpan {
primary_spans: vec,
span_labels: vec![]
}
}
pub fn push_span_label(&mut self, span: Span, label: String) {
self.span_labels.push((span, label));
}
@ -240,10 +254,7 @@ impl MultiSpan {
impl From<Span> for MultiSpan {
fn from(span: Span) -> MultiSpan {
MultiSpan {
primary_spans: vec![span],
span_labels: vec![]
}
MultiSpan::from_span(span)
}
}