mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Remove dead code
This commit is contained in:
parent
7a39bc3ba2
commit
0aece75cdd
8 changed files with 40 additions and 55 deletions
|
@ -317,8 +317,7 @@ fn scope_for_offset(
|
|||
if source.file_id != offset.file_id {
|
||||
return None;
|
||||
}
|
||||
let syntax_node_ptr =
|
||||
source.value.either(|it| it.syntax_node_ptr(), |it| it.syntax_node_ptr());
|
||||
let syntax_node_ptr = source.value.syntax_node_ptr();
|
||||
Some((syntax_node_ptr, scope))
|
||||
})
|
||||
// find containing scope
|
||||
|
@ -397,8 +396,7 @@ fn adjust(
|
|||
if source.file_id != file_id {
|
||||
return None;
|
||||
}
|
||||
let syntax_node_ptr =
|
||||
source.value.either(|it| it.syntax_node_ptr(), |it| it.syntax_node_ptr());
|
||||
let syntax_node_ptr = source.value.syntax_node_ptr();
|
||||
Some((syntax_node_ptr, scope))
|
||||
})
|
||||
.map(|(ptr, scope)| (ptr.range(), scope))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue