mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 13:48:50 +00:00
fix: rename syntax_editor_add_generic_param
to add_generic_param
Signed-off-by: Tarek <tareknaser360@gmail.com>
This commit is contained in:
parent
b7e613c0dc
commit
8954a7f9e9
2 changed files with 2 additions and 2 deletions
|
@ -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));
|
||||
|
|
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue