Fix code after rowan version bump

This commit is contained in:
ivan770 2021-03-16 17:39:49 +02:00
parent 5f5a3e6eae
commit b67a91b960
No known key found for this signature in database
GPG Key ID: D8C4BD5AE4D9CC4D

View File

@ -35,7 +35,7 @@ pub(crate) fn move_item(
fn find_ancestors(item: SyntaxElement, direction: Direction) -> Option<TextEdit> { fn find_ancestors(item: SyntaxElement, direction: Direction) -> Option<TextEdit> {
let root = match item { let root = match item {
NodeOrToken::Node(node) => node, NodeOrToken::Node(node) => node,
NodeOrToken::Token(token) => token.parent(), NodeOrToken::Token(token) => token.parent()?,
}; };
let ancestor = once(root.clone()) let ancestor = once(root.clone())