From af79491ae62ebba739d3375c425b71c48f4b4905 Mon Sep 17 00:00:00 2001 From: Jonas Marcello Date: Tue, 28 Feb 2023 10:32:42 +0100 Subject: [PATCH] Rename method to generic_parameters --- crates/hir/src/lib.rs | 2 +- crates/ide/src/runnables.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 394ef4a9e09..c59e17af1f8 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -3416,7 +3416,7 @@ pub fn type_and_const_arguments<'a>( } /// Combines lifetime indicators, type and constant parameters into a single `Iterator` - pub fn lifetime_type_const_paramaters<'a>( + pub fn generic_parameters<'a>( &'a self, db: &'a dyn HirDatabase, ) -> impl Iterator + 'a { diff --git a/crates/ide/src/runnables.rs b/crates/ide/src/runnables.rs index 8de81206b6f..77aef710ad1 100644 --- a/crates/ide/src/runnables.rs +++ b/crates/ide/src/runnables.rs @@ -370,7 +370,7 @@ pub(crate) fn runnable_impl( let nav = def.try_to_nav(sema.db)?; let ty = def.self_ty(sema.db); let adt_name = ty.as_adt()?.name(sema.db); - let mut ty_args = ty.lifetime_type_const_paramaters(sema.db).peekable(); + let mut ty_args = ty.generic_parameters(sema.db).peekable(); let params = if ty_args.peek().is_some() { format!("<{}>", ty_args.format_with(",", |ty, cb| cb(&ty))) } else { @@ -436,7 +436,7 @@ fn module_def_doctest(db: &RootDatabase, def: Definition) -> Option { let ty = imp.self_ty(db); if let Some(adt) = ty.as_adt() { let name = adt.name(db); - let mut ty_args = ty.lifetime_type_const_paramaters(db).peekable(); + let mut ty_args = ty.generic_parameters(db).peekable(); format_to!(path, "{}", name); if ty_args.peek().is_some() { format_to!(path, "<{}>", ty_args.format_with(",", |ty, cb| cb(&ty)));