mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Some clippy cleanups
This commit is contained in:
parent
c1e10a24fa
commit
6753051a45
15 changed files with 49 additions and 55 deletions
|
@ -89,7 +89,11 @@ pub(crate) fn reference_definition(
|
|||
.and_then(hir::Path::from_ast)
|
||||
{
|
||||
let resolved = resolver.resolve_path(db, &path);
|
||||
match resolved.clone().take_types().or(resolved.take_values()) {
|
||||
match resolved
|
||||
.clone()
|
||||
.take_types()
|
||||
.or_else(|| resolved.take_values())
|
||||
{
|
||||
Some(Resolution::Def(def)) => return Exact(NavigationTarget::from_def(db, def)),
|
||||
Some(Resolution::LocalBinding(pat)) => {
|
||||
let body = resolver.body().expect("no body for local binding");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue