(&self)
| 114 | |
| 115 | impl ToSpan for QueryCompoundSelector<'_> { |
| 116 | fn to_span(&self) -> Span { |
| 117 | let start = self |
| 118 | .leading_combinator |
| 119 | .as_ref() |
| 120 | .map(ToSpan::to_span) |
| 121 | .or_else(|| self.parts.first().map(ToSpan::to_span)) |
| 122 | .unwrap_or_else(|| Span::new(css_lexer::SourceOffset(0), css_lexer::SourceOffset(0))); |
| 123 | let end = self.parts.last().map(ToSpan::to_span).unwrap_or(start); |
| 124 | Span::new(start.start(), end.end()) |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | impl SemanticEq for QueryCompoundSelector<'_> { |
no test coverage detected