Rename method to generic_parameters

This commit is contained in:
Jonas Marcello 2023-02-28 10:32:42 +01:00
parent f494d1199d
commit af79491ae6
2 changed files with 3 additions and 3 deletions

View File

@ -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<Item = SmolStr> + 'a {

View File

@ -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<Runnable> {
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)));