aboutsummaryrefslogtreecommitdiff
path: root/helix-core
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-03-16 04:49:22 +0000
committerBlaž Hrastnik2021-03-16 04:51:35 +0000
commit081e0ae8ae4ead621010e7e6a060194fe2433bad (patch)
tree5f199eadd3c153587e7efd7fc5f69ddbf9af61ee /helix-core
parent71f899cb5b7753115b2e16ca115b4f376c4b6aee (diff)
syntax: highlight_iter always returns Ok()
Diffstat (limited to 'helix-core')
-rw-r--r--helix-core/src/syntax.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs
index c698b000..acf4ad61 100644
--- a/helix-core/src/syntax.rs
+++ b/helix-core/src/syntax.rs
@@ -269,7 +269,7 @@ impl Syntax {
range: Option<std::ops::Range<usize>>,
cancellation_flag: Option<&'a AtomicUsize>,
mut injection_callback: impl FnMut(&str) -> Option<&'a HighlightConfiguration> + 'a,
- ) -> Result<impl Iterator<Item = Result<HighlightEvent, Error>> + 'a, Error> {
+ ) -> impl Iterator<Item = Result<HighlightEvent, Error>> + 'a {
// The `captures` iterator borrows the `Tree` and the `QueryCursor`, which
// prevents them from being moved. But both of these values are really just
// pointers, so it's actually ok to move them.
@@ -325,7 +325,7 @@ impl Syntax {
last_highlight_range: None,
};
result.sort_layers();
- Ok(result)
+ result
}
// on_tokenize
// on_change_highlighting