Get error message improvements. (#1185)

More especific "get" command error messages + Test refactoring.
This commit is contained in:
Andrés N. Robalino
2020-01-10 10:44:24 -05:00
committed by GitHub
parent 347f91ab53
commit 6d3a30772d
14 changed files with 342 additions and 240 deletions

View File

@ -393,7 +393,6 @@ impl Tag {
}
}
#[allow(unused)]
pub fn tag_for_tagged_list(mut iter: impl Iterator<Item = Tag>) -> Tag {
let first = iter.next();
@ -410,7 +409,6 @@ pub fn tag_for_tagged_list(mut iter: impl Iterator<Item = Tag>) -> Tag {
}
}
#[allow(unused)]
pub fn span_for_spanned_list(mut iter: impl Iterator<Item = Span>) -> Span {
let first = iter.next();
@ -471,6 +469,12 @@ impl Span {
}
}
pub fn since(&self, other: impl Into<Span>) -> Span {
let other = other.into();
Span::new(other.start, self.end)
}
pub fn until(&self, other: impl Into<Span>) -> Span {
let other = other.into();