From b67a91b96043fb750698f909354a5b73c1929e5d Mon Sep 17 00:00:00 2001 From: ivan770 Date: Tue, 16 Mar 2021 17:39:49 +0200 Subject: [PATCH] Fix code after rowan version bump --- crates/ide/src/move_item.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ide/src/move_item.rs b/crates/ide/src/move_item.rs index 5a0faaf7b0c..dbbf2f4c9b8 100644 --- a/crates/ide/src/move_item.rs +++ b/crates/ide/src/move_item.rs @@ -35,7 +35,7 @@ pub(crate) fn move_item( fn find_ancestors(item: SyntaxElement, direction: Direction) -> Option { let root = match item { NodeOrToken::Node(node) => node, - NodeOrToken::Token(token) => token.parent(), + NodeOrToken::Token(token) => token.parent()?, }; let ancestor = once(root.clone())