From 75b1f9ee23e1702901d08707689690308d74953d Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 3 Sep 2020 12:18:46 +0200 Subject: Unify naming --- crates/assists/src/ast_transform.rs | 2 +- crates/syntax/src/ast/edit.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'crates') diff --git a/crates/assists/src/ast_transform.rs b/crates/assists/src/ast_transform.rs index 5216862ba..bbcd2d488 100644 --- a/crates/assists/src/ast_transform.rs +++ b/crates/assists/src/ast_transform.rs @@ -166,7 +166,7 @@ impl<'a> QualifyPaths<'a> { .map(|arg_list| apply(self, arg_list)); if let Some(type_args) = type_args { let last_segment = path.segment().unwrap(); - path = path.with_segment(last_segment.with_type_args(type_args)) + path = path.with_segment(last_segment.with_generic_args(type_args)) } Some(path.syntax().clone()) diff --git a/crates/syntax/src/ast/edit.rs b/crates/syntax/src/ast/edit.rs index 060b20966..823475333 100644 --- a/crates/syntax/src/ast/edit.rs +++ b/crates/syntax/src/ast/edit.rs @@ -260,16 +260,16 @@ impl ast::Path { impl ast::PathSegment { #[must_use] - pub fn with_type_args(&self, type_args: ast::GenericArgList) -> ast::PathSegment { - self._with_type_args(type_args, false) + pub fn with_generic_args(&self, type_args: ast::GenericArgList) -> ast::PathSegment { + self._with_generic_args(type_args, false) } #[must_use] pub fn with_turbo_fish(&self, type_args: ast::GenericArgList) -> ast::PathSegment { - self._with_type_args(type_args, true) + self._with_generic_args(type_args, true) } - fn _with_type_args(&self, type_args: ast::GenericArgList, turbo: bool) -> ast::PathSegment { + fn _with_generic_args(&self, type_args: ast::GenericArgList, turbo: bool) -> ast::PathSegment { if let Some(old) = self.generic_arg_list() { return self.replace_children( single_node(old.syntax().clone()), -- cgit v1.2.3