aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/lib.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-05-05 19:42:52 +0100
committerAleksey Kladov <[email protected]>2020-05-05 19:42:52 +0100
commitaee22c73c3cafdb6f4b3f97bc483791d4ed2e902 (patch)
tree735eef9b6397b68ad7d1297737fdb638941803e8 /crates/ra_assists/src/lib.rs
parent6c2414430aca92f95eda9f0238dce8af2de552af (diff)
Move group_label where it belongs
Diffstat (limited to 'crates/ra_assists/src/lib.rs')
-rw-r--r--crates/ra_assists/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_assists/src/lib.rs b/crates/ra_assists/src/lib.rs
index 6156f4e2c..1b31d655b 100644
--- a/crates/ra_assists/src/lib.rs
+++ b/crates/ra_assists/src/lib.rs
@@ -35,16 +35,17 @@ pub struct AssistLabel {
35 pub id: AssistId, 35 pub id: AssistId,
36 /// Short description of the assist, as shown in the UI. 36 /// Short description of the assist, as shown in the UI.
37 pub label: String, 37 pub label: String,
38 pub group: Option<GroupLabel>,
38} 39}
39 40
40#[derive(Clone, Debug)] 41#[derive(Clone, Debug)]
41pub struct GroupLabel(pub String); 42pub struct GroupLabel(pub String);
42 43
43impl AssistLabel { 44impl AssistLabel {
44 pub(crate) fn new(id: AssistId, label: String) -> AssistLabel { 45 pub(crate) fn new(id: AssistId, label: String, group: Option<GroupLabel>) -> AssistLabel {
45 // FIXME: make fields private, so that this invariant can't be broken 46 // FIXME: make fields private, so that this invariant can't be broken
46 assert!(label.starts_with(|c: char| c.is_uppercase())); 47 assert!(label.starts_with(|c: char| c.is_uppercase()));
47 AssistLabel { label, id } 48 AssistLabel { id, label, group }
48 } 49 }
49} 50}
50 51
@@ -60,7 +61,6 @@ pub struct AssistAction {
60#[derive(Debug, Clone)] 61#[derive(Debug, Clone)]
61pub struct ResolvedAssist { 62pub struct ResolvedAssist {
62 pub label: AssistLabel, 63 pub label: AssistLabel,
63 pub group_label: Option<GroupLabel>,
64 pub action: AssistAction, 64 pub action: AssistAction,
65} 65}
66 66