Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/handlers/unnecessary_async.rs')
| -rw-r--r-- | crates/ide-assists/src/handlers/unnecessary_async.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ide-assists/src/handlers/unnecessary_async.rs b/crates/ide-assists/src/handlers/unnecessary_async.rs index d90fee7809..d5cd2d5513 100644 --- a/crates/ide-assists/src/handlers/unnecessary_async.rs +++ b/crates/ide-assists/src/handlers/unnecessary_async.rs @@ -26,7 +26,7 @@ use crate::{AssistContext, Assists}; // pub fn foo() {} // pub async fn bar() { foo() } // ``` -pub(crate) fn unnecessary_async(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { +pub(crate) fn unnecessary_async(acc: &mut Assists, ctx: &AssistContext<'_>) -> Option<()> { let function: ast::Fn = ctx.find_node_at_offset()?; // Do nothing if the cursor is not on the prototype. This is so that the check does not pollute @@ -89,7 +89,7 @@ pub(crate) fn unnecessary_async(acc: &mut Assists, ctx: &AssistContext) -> Optio } fn find_all_references( - ctx: &AssistContext, + ctx: &AssistContext<'_>, def: &Definition, ) -> impl Iterator<Item = (FileId, FileReference)> { def.usages(&ctx.sema).all().into_iter().flat_map(|(file_id, references)| { @@ -99,7 +99,7 @@ fn find_all_references( /// Finds the await expression for the given `NameRef`. /// If no await expression is found, returns None. -fn find_await_expression(ctx: &AssistContext, nameref: &NameRef) -> Option<ast::AwaitExpr> { +fn find_await_expression(ctx: &AssistContext<'_>, nameref: &NameRef) -> Option<ast::AwaitExpr> { // From the nameref, walk up the tree to the await expression. let await_expr = if let Some(path) = full_path_of_name_ref(&nameref) { // Function calls. |