diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ide/src/move_item.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide/src/move_item.rs b/crates/ide/src/move_item.rs index 5a0faaf7b..dbbf2f4c9 100644 --- a/crates/ide/src/move_item.rs +++ b/crates/ide/src/move_item.rs | |||
@@ -35,7 +35,7 @@ pub(crate) fn move_item( | |||
35 | fn find_ancestors(item: SyntaxElement, direction: Direction) -> Option<TextEdit> { | 35 | fn find_ancestors(item: SyntaxElement, direction: Direction) -> Option<TextEdit> { |
36 | let root = match item { | 36 | let root = match item { |
37 | NodeOrToken::Node(node) => node, | 37 | NodeOrToken::Node(node) => node, |
38 | NodeOrToken::Token(token) => token.parent(), | 38 | NodeOrToken::Token(token) => token.parent()?, |
39 | }; | 39 | }; |
40 | 40 | ||
41 | let ancestor = once(root.clone()) | 41 | let ancestor = once(root.clone()) |