diff options
author | Blaž Hrastnik | 2021-03-26 02:02:32 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-03-26 02:03:14 +0000 |
commit | ad3325db8e6dce3a10b9f8e0319ab9814c7ade1b (patch) | |
tree | b855b4ca22fccb6eb97f011af3f26372d5c8df1c /helix-core/src/indent.rs | |
parent | cf0e191a6a42a2382128765dc0ff1531ad9800af (diff) |
minor: Remove a few unwraps.
Diffstat (limited to 'helix-core/src/indent.rs')
-rw-r--r-- | helix-core/src/indent.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-core/src/indent.rs b/helix-core/src/indent.rs index 7fedb7d3..4bd644d4 100644 --- a/helix-core/src/indent.rs +++ b/helix-core/src/indent.rs @@ -24,7 +24,7 @@ fn indent_level_for_line(line: RopeSlice, tab_width: usize) -> usize { /// Find the highest syntax node at position. /// This is to identify the column where this node (e.g., an HTML closing tag) ends. fn get_highest_syntax_node_at_bytepos(syntax: &Syntax, pos: usize) -> Option<Node> { - let tree = syntax.root_layer.tree.as_ref().unwrap(); + let tree = syntax.tree(); // named_descendant let mut node = match tree.root_node().descendant_for_byte_range(pos, pos) { |