Remove dead code

This commit is contained in:
Aleksey Kladov 2020-04-11 19:25:33 +02:00
parent 7a39bc3ba2
commit 0aece75cdd
8 changed files with 40 additions and 55 deletions

View file

@ -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))