(&self, subject: &Self::Subject)
| 1213 | } |
| 1214 | |
| 1215 | fn labels(&self, subject: &Self::Subject) -> Option<Box<dyn Iterator<Item = Label>>> { |
| 1216 | let offset = self.complete_offset(); |
| 1217 | let len = self.invalid_encoding_len(subject); |
| 1218 | let text = match self { |
| 1219 | ParseError::NoLeadingSlash => "must start with a slash ('/')", |
| 1220 | ParseError::InvalidEncoding { .. } => "'~' must be followed by '0' or '1'", |
| 1221 | } |
| 1222 | .to_string(); |
| 1223 | Some(Box::new(once(Label::new(text, offset, len)))) |
| 1224 | } |
| 1225 | } |
| 1226 | |
| 1227 | #[cfg(feature = "miette")] |
nothing calls this directly
no test coverage detected