aboutsummaryrefslogtreecommitdiff
path: root/helix-core
diff options
context:
space:
mode:
authorBlaž Hrastnik2022-01-23 07:15:27 +0000
committerBlaž Hrastnik2022-01-23 07:15:27 +0000
commit4080341977d10abe91808711a3d5c2bc726c10e1 (patch)
tree898cc76deaf7647255dc96e339329c5be8080356 /helix-core
parent7c9ebd05b83e90e55d032f65d9405ad265b82258 (diff)
cargo fmt + clippy lint
Diffstat (limited to 'helix-core')
-rw-r--r--helix-core/src/syntax.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs
index 6a8a9be5..d6ec7610 100644
--- a/helix-core/src/syntax.rs
+++ b/helix-core/src/syntax.rs
@@ -436,7 +436,7 @@ impl Syntax {
};
syntax
- .update(source, source, &ChangeSet::new(&source))
+ .update(source, source, &ChangeSet::new(source))
.unwrap();
syntax
@@ -735,9 +735,7 @@ impl Syntax {
.peekable();
// If there's no captures, skip the layer
- if captures.peek().is_none() {
- return None;
- }
+ captures.peek()?;
Some(HighlightIterLayer {
highlight_end_stack: Vec::new(),