Skip to content

Commit 0a99a9f

Browse files
committed
fix: rename syntax_editor_add_generic_param to add_generic_param
Signed-off-by: Tarek <[email protected]>
1 parent 6120a8a commit 0a99a9f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/tools/rust-analyzer/crates/ide-assists/src/handlers/introduce_named_generic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pub(crate) fn introduce_named_generic(acc: &mut Assists, ctx: &AssistContext<'_>
5050
let new_ty = make.ty(&type_param_name);
5151

5252
editor.replace(impl_trait_type.syntax(), new_ty.syntax());
53-
editor.syntax_editor_add_generic_param(fn_, type_param.clone().into());
53+
editor.add_generic_param(&fn_, type_param.clone().into());
5454

5555
if let Some(cap) = ctx.config.snippet_cap {
5656
editor.add_annotation(type_param.syntax(), builder.make_tabstop_before(cap));

src/tools/rust-analyzer/crates/syntax/src/syntax_editor/edits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use crate::{
77

88
impl SyntaxEditor {
99
/// Adds a new generic param to the function using `SyntaxEditor`
10-
pub fn syntax_editor_add_generic_param(&mut self, function: Fn, new_param: GenericParam) {
10+
pub fn add_generic_param(&mut self, function: &Fn, new_param: GenericParam) {
1111
match function.generic_param_list() {
1212
Some(generic_param_list) => match generic_param_list.generic_params().last() {
1313
Some(last_param) => {

0 commit comments

Comments
 (0)