Skip to content

Commit db9a4db

Browse files
committed
rename set_path_with_editor to set_path
1 parent a77f115 commit db9a4db

3 files changed

Lines changed: 3 additions & 7 deletions

File tree

crates/ide-assists/src/handlers/convert_let_else_to_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ fn remove_mut_and_collect_idents(
139139
p.name()?,
140140
);
141141
let non_mut_pat = if let Some(inner) = p.pat() {
142-
non_mut_pat.set_pat_with_editor(
142+
non_mut_pat.set_pat(
143143
remove_mut_and_collect_idents(make, editor, &inner, acc),
144144
editor,
145145
make,

crates/ide-assists/src/handlers/destructure_tuple_binding.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,7 @@ impl AssignmentEdit {
226226
fn apply(self, syntax_editor: &mut SyntaxEditor, syntax_mapping: &SyntaxFactory) {
227227
// with sub_pattern: keep original tuple and add subpattern: `tup @ (_0, _1)`
228228
if self.in_sub_pattern {
229-
self.ident_pat.set_pat_with_editor(
230-
Some(self.tuple_pat.into()),
231-
syntax_editor,
232-
syntax_mapping,
233-
);
229+
self.ident_pat.set_pat(Some(self.tuple_pat.into()), syntax_editor, syntax_mapping);
234230
} else if self.is_shorthand_field {
235231
syntax_editor.insert(Position::after(self.ident_pat.syntax()), self.tuple_pat.syntax());
236232
syntax_editor

crates/syntax/src/ast/edit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ pub trait AstNodeEdit: AstNode + Clone + Sized {
198198
impl<N: AstNode + Clone> AstNodeEdit for N {}
199199

200200
impl ast::IdentPat {
201-
pub fn set_pat_with_editor(
201+
pub fn set_pat(
202202
&self,
203203
pat: Option<ast::Pat>,
204204
syntax_editor: &mut SyntaxEditor,

0 commit comments

Comments
 (0)