aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/assist_ctx.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/assist_ctx.rs')
-rw-r--r--crates/ra_assists/src/assist_ctx.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_assists/src/assist_ctx.rs b/crates/ra_assists/src/assist_ctx.rs
index e9c4f0a23..4ad21c74b 100644
--- a/crates/ra_assists/src/assist_ctx.rs
+++ b/crates/ra_assists/src/assist_ctx.rs
@@ -7,7 +7,7 @@ use ra_syntax::{
7}; 7};
8use ra_fmt::{leading_indent, reindent}; 8use ra_fmt::{leading_indent, reindent};
9 9
10use crate::{AssistLabel, AssistAction}; 10use crate::{AssistLabel, AssistAction, AssistId};
11 11
12#[derive(Clone, Debug)] 12#[derive(Clone, Debug)]
13pub(crate) enum Assist { 13pub(crate) enum Assist {
@@ -81,10 +81,11 @@ impl<'a, DB: HirDatabase> AssistCtx<'a, DB> {
81 81
82 pub(crate) fn add_action( 82 pub(crate) fn add_action(
83 &mut self, 83 &mut self,
84 id: AssistId,
84 label: impl Into<String>, 85 label: impl Into<String>,
85 f: impl FnOnce(&mut AssistBuilder), 86 f: impl FnOnce(&mut AssistBuilder),
86 ) -> &mut Self { 87 ) -> &mut Self {
87 let label = AssistLabel { label: label.into() }; 88 let label = AssistLabel { label: label.into(), id };
88 match &mut self.assist { 89 match &mut self.assist {
89 Assist::Unresolved(labels) => labels.push(label), 90 Assist::Unresolved(labels) => labels.push(label),
90 Assist::Resolved(labels_actions) => { 91 Assist::Resolved(labels_actions) => {