From e2e1f4cecaa2d373f58260b504fd014efe49cf89 Mon Sep 17 00:00:00 2001 From: Erlend Tobiassen Date: Sun, 27 Jan 2019 14:49:02 +0100 Subject: Typos --- crates/ra_syntax/src/algo.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_syntax/src') diff --git a/crates/ra_syntax/src/algo.rs b/crates/ra_syntax/src/algo.rs index 45747e21d..99b0983b0 100644 --- a/crates/ra_syntax/src/algo.rs +++ b/crates/ra_syntax/src/algo.rs @@ -17,14 +17,14 @@ pub fn find_leaf_at_offset(node: &SyntaxNode, offset: TextUnit) -> LeafAtOffset< } /// Finds a node of specific Ast type at offset. Note that this is slightly -/// impercise: if the cursor is strictly betwen two nodes of the desired type, +/// imprecise: if the cursor is strictly between two nodes of the desired type, /// as in /// /// ```no-run /// struct Foo {}|struct Bar; /// ``` /// -/// then the left node will be silently prefered. +/// then the left node will be silently preferred. pub fn find_node_at_offset(syntax: &SyntaxNode, offset: TextUnit) -> Option<&N> { find_leaf_at_offset(syntax, offset).find_map(|leaf| leaf.ancestors().find_map(N::cast)) } -- cgit v1.2.3