fix: rename syntax_editor_add_generic_param to add_generic_param

Signed-off-by: Tarek <tareknaser360@gmail.com>
This commit is contained in:
Tarek 2024-12-05 13:50:43 +02:00
parent b7e613c0dc
commit 8954a7f9e9
No known key found for this signature in database
GPG key ID: 58C48198E7CC6EBD
2 changed files with 2 additions and 2 deletions

View file

@ -50,7 +50,7 @@ pub(crate) fn introduce_named_generic(acc: &mut Assists, ctx: &AssistContext<'_>
let new_ty = make.ty(&type_param_name);
editor.replace(impl_trait_type.syntax(), new_ty.syntax());
editor.syntax_editor_add_generic_param(fn_, type_param.clone().into());
editor.add_generic_param(&fn_, type_param.clone().into());
if let Some(cap) = ctx.config.snippet_cap {
editor.add_annotation(type_param.syntax(), builder.make_tabstop_before(cap));

View file

@ -7,7 +7,7 @@ use crate::{
impl SyntaxEditor {
/// Adds a new generic param to the function using `SyntaxEditor`
pub fn syntax_editor_add_generic_param(&mut self, function: Fn, new_param: GenericParam) {
pub fn add_generic_param(&mut self, function: &Fn, new_param: GenericParam) {
match function.generic_param_list() {
Some(generic_param_list) => match generic_param_list.generic_params().last() {
Some(last_param) => {