mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-14 06:03:58 +00:00
Cleanup file structure proto handling
This commit is contained in:
parent
82141705b0
commit
232432411e
1 changed files with 3 additions and 10 deletions
|
@ -489,12 +489,12 @@ pub(crate) fn handle_document_symbol(
|
|||
tags.push(SymbolTag::DEPRECATED)
|
||||
};
|
||||
|
||||
#[allow(deprecated)]
|
||||
let doc_symbol = lsp_types::DocumentSymbol {
|
||||
name: symbol.label,
|
||||
detail: symbol.detail,
|
||||
kind: to_proto::structure_node_kind(symbol.kind),
|
||||
tags: Some(tags),
|
||||
#[allow(deprecated)]
|
||||
deprecated: Some(symbol.deprecated),
|
||||
range: to_proto::range(&line_index, symbol.node_range),
|
||||
selection_range: to_proto::range(&line_index, symbol.navigation_range),
|
||||
|
@ -539,18 +539,11 @@ pub(crate) fn handle_document_symbol(
|
|||
url: &Url,
|
||||
res: &mut Vec<SymbolInformation>,
|
||||
) {
|
||||
let mut tags = Vec::new();
|
||||
|
||||
#[allow(deprecated)]
|
||||
if let Some(true) = symbol.deprecated {
|
||||
tags.push(SymbolTag::DEPRECATED)
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
res.push(SymbolInformation {
|
||||
name: symbol.name.clone(),
|
||||
kind: symbol.kind,
|
||||
tags: Some(tags),
|
||||
tags: symbol.tags.clone(),
|
||||
#[allow(deprecated)]
|
||||
deprecated: symbol.deprecated,
|
||||
location: Location::new(url.clone(), symbol.range),
|
||||
container_name,
|
||||
|
|
Loading…
Reference in a new issue