From 201b344f2b0c9e84606115d135cd658d0a955d2c Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Sat, 20 Jul 2019 00:20:09 +0300 Subject: Refactor server api --- crates/ra_ide_api/src/display/structure.rs | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'crates/ra_ide_api/src/display') diff --git a/crates/ra_ide_api/src/display/structure.rs b/crates/ra_ide_api/src/display/structure.rs index bd2e908da..2ba10b2ef 100644 --- a/crates/ra_ide_api/src/display/structure.rs +++ b/crates/ra_ide_api/src/display/structure.rs @@ -1,6 +1,5 @@ use crate::TextRange; -use ra_syntax::ast::PatKind; use ra_syntax::{ algo::visit::{visitor, Visitor}, ast::{self, AttrsOwner, NameOwner, TypeAscriptionOwner, TypeParamsOwner}, @@ -156,32 +155,6 @@ fn structure_node(node: &SyntaxNode) -> Option { } decl(mc) }) - .visit(|let_statement: ast::LetStmt| { - let let_syntax = let_statement.syntax(); - - let mut label = String::new(); - collapse_ws(let_syntax, &mut label); - - if let_statement.ascribed_type().is_some() { - return None; - } - - let pat_range = match let_statement.pat()?.kind() { - PatKind::BindPat(bind_pat) => bind_pat.syntax().range(), - PatKind::TuplePat(tuple_pat) => tuple_pat.syntax().range(), - _ => return None, - }; - - Some(StructureNode { - parent: None, - label, - navigation_range: pat_range, - node_range: let_syntax.range(), - kind: let_syntax.kind(), - detail: None, - deprecated: false, - }) - }) .accept(&node)? } -- cgit v1.2.3