Run cargo fix --edition-idioms

This commit is contained in:
Amos Wenger 2022-07-20 15:02:08 +02:00
parent 23d25a3094
commit 816f7fe12a
230 changed files with 888 additions and 888 deletions

View file

@ -305,7 +305,7 @@ impl Definition {
}
}
pub fn usages<'a>(self, sema: &'a Semantics<RootDatabase>) -> FindUsages<'a> {
pub fn usages<'a>(self, sema: &'a Semantics<'_, RootDatabase>) -> FindUsages<'a> {
FindUsages {
local_repr: match self {
Definition::Local(local) => Some(local.representative(sema.db)),
@ -424,7 +424,7 @@ impl<'a> FindUsages<'a> {
}
fn scope_files<'a>(
sema: &'a Semantics<RootDatabase>,
sema: &'a Semantics<'_, RootDatabase>,
scope: &'a SearchScope,
) -> impl Iterator<Item = (Arc<String>, FileId, TextRange)> + 'a {
scope.entries.iter().map(|(&file_id, &search_range)| {
@ -740,7 +740,7 @@ impl<'a> FindUsages<'a> {
}
}
fn def_to_ty(sema: &Semantics<RootDatabase>, def: &Definition) -> Option<hir::Type> {
fn def_to_ty(sema: &Semantics<'_, RootDatabase>, def: &Definition) -> Option<hir::Type> {
match def {
Definition::Adt(adt) => Some(adt.ty(sema.db)),
Definition::TypeAlias(it) => Some(it.ty(sema.db)),