(re: &str)
| 279 | } |
| 280 | |
| 281 | fn parse(re: &str) -> Result<Hir> { |
| 282 | use syntax::ParserBuilder; |
| 283 | ParserBuilder::new() |
| 284 | .allow_invalid_utf8(true) |
| 285 | .build() |
| 286 | .parse(re) |
| 287 | .map_err(From::from) |
| 288 | } |
| 289 | |
| 290 | fn escape_unicode(bytes: &[u8]) -> String { |
| 291 | let show = match ::std::str::from_utf8(bytes) { |
no test coverage detected