@@ -269,7 +269,7 @@ impl Syntax {
269 range: Option<std::ops::Range<usize>>,
269 range: Option<std::ops::Range<usize>>,
270 cancellation_flag: Option<&'a AtomicUsize>,
270 cancellation_flag: Option<&'a AtomicUsize>,
271 mut injection_callback: impl FnMut(&str) -> Option<&'a HighlightConfiguration> + 'a,
271 mut injection_callback: impl FnMut(&str) -> Option<&'a HighlightConfiguration> + 'a,
272− ) -> Result<impl Iterator<Item = Result<HighlightEvent, Error>> + 'a, Error> {
272+ ) -> impl Iterator<Item = Result<HighlightEvent, Error>> + 'a {
273 // The `captures` iterator borrows the `Tree` and the `QueryCursor`, which
273 // The `captures` iterator borrows the `Tree` and the `QueryCursor`, which
274 // prevents them from being moved. But both of these values are really just
274 // prevents them from being moved. But both of these values are really just
275 // pointers, so it's actually ok to move them.
275 // pointers, so it's actually ok to move them.
@@ -325,7 +325,7 @@ impl Syntax {
325 last_highlight_range: None,
325 last_highlight_range: None,
327 result.sort_layers();
327 result.sort_layers();
328− Ok(result)
328+ result
330 // on_tokenize
330 // on_tokenize
331 // on_change_highlighting
331 // on_change_highlighting