Skip to content

Commit f480f9a

Browse files
committed
Refactor
1 parent 6eb5adc commit f480f9a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ast/spans.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ impl Spanned for TokenWithSpan {
108108

109109
impl<T> Spanned for Parens<T> {
110110
fn span(&self) -> Span {
111-
union_spans([self.opening_token.0.span, self.closing_token.0.span].into_iter())
111+
self.opening_token.0.span.union(&self.closing_token.0.span)
112112
}
113113
}
114114

@@ -248,7 +248,7 @@ impl Spanned for Values {
248248
match &rows[..] {
249249
[] => Span::empty(),
250250
[f] => f.span(),
251-
[f, .., l] => union_spans([f.span(), l.span()].into_iter()),
251+
[f, .., l] => f.span().union(&l.span()),
252252
}
253253
}
254254
}

0 commit comments

Comments
 (0)