From 0e0ae47b47f80e30fca366e5922c19ff81b0a2e2 Mon Sep 17 00:00:00 2001 From: Andrea Pretto Date: Tue, 19 Feb 2019 17:54:00 +0100 Subject: auto_import: use TextEditBuilder instead of AssistBuilder to make it more reusable --- crates/ra_assists/src/assist_ctx.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/ra_assists/src/assist_ctx.rs') diff --git a/crates/ra_assists/src/assist_ctx.rs b/crates/ra_assists/src/assist_ctx.rs index e80e35738..17a9041c5 100644 --- a/crates/ra_assists/src/assist_ctx.rs +++ b/crates/ra_assists/src/assist_ctx.rs @@ -144,6 +144,10 @@ impl AssistBuilder { self.replace(node.range(), replace_with) } + pub(crate) fn set_edit_builder(&mut self, edit: TextEditBuilder) { + self.edit = edit; + } + #[allow(unused)] pub(crate) fn delete(&mut self, range: TextRange) { self.edit.delete(range) -- cgit v1.2.3