(&self)
| 183 | |
| 184 | impl ToSpan for Nth { |
| 185 | fn to_span(&self) -> Span { |
| 186 | match self { |
| 187 | Nth::Odd(c) => c.to_span(), |
| 188 | Nth::Even(c) => c.to_span(), |
| 189 | Nth::Integer(c) => c.to_span(), |
| 190 | Nth::Anb(_, _, cursors) => { |
| 191 | let mut span = Span::ZERO; |
| 192 | for c in cursors { |
| 193 | if *c != Cursor::EMPTY { |
| 194 | span = span + (*c).into() |
| 195 | } |
| 196 | } |
| 197 | span |
| 198 | } |
| 199 | } |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | #[cfg(test)] |
no outgoing calls
no test coverage detected