From d14ca05d6b877826337db02888514269e1071f8c Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Thu, 2 Dec 2021 10:31:19 +0900 Subject: Simplify some cases that use return None to use ? --- helix-core/src/indent.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'helix-core') diff --git a/helix-core/src/indent.rs b/helix-core/src/indent.rs index 88ab09b5..8ccc0120 100644 --- a/helix-core/src/indent.rs +++ b/helix-core/src/indent.rs @@ -194,10 +194,7 @@ fn get_highest_syntax_node_at_bytepos(syntax: &Syntax, pos: usize) -> Option node, - None => return None, - }; + let mut node = tree.root_node().descendant_for_byte_range(pos, pos)?; while let Some(parent) = node.parent() { if parent.start_byte() == node.start_byte() { -- cgit v1.2.3-70-g09d2