diff options
author | Aleksey Kladov <[email protected]> | 2020-05-05 19:30:33 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-05-05 19:30:33 +0100 |
commit | 13c078db9cba8bbbf48918a928cd2533571a7f5d (patch) | |
tree | e3900b8f132c4dc4260a2154334b91ec93576edd /crates/ra_assists/src/lib.rs | |
parent | 8803e748a627f2ff45d441e70b3deda3f038c40e (diff) |
Flip Assist::new arguments
Diffstat (limited to 'crates/ra_assists/src/lib.rs')
-rw-r--r-- | crates/ra_assists/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/lib.rs b/crates/ra_assists/src/lib.rs index c5df86600..6156f4e2c 100644 --- a/crates/ra_assists/src/lib.rs +++ b/crates/ra_assists/src/lib.rs | |||
@@ -32,16 +32,16 @@ pub struct AssistId(pub &'static str); | |||
32 | 32 | ||
33 | #[derive(Debug, Clone)] | 33 | #[derive(Debug, Clone)] |
34 | pub struct AssistLabel { | 34 | pub struct AssistLabel { |
35 | pub id: AssistId, | ||
35 | /// Short description of the assist, as shown in the UI. | 36 | /// Short description of the assist, as shown in the UI. |
36 | pub label: String, | 37 | pub label: String, |
37 | pub id: AssistId, | ||
38 | } | 38 | } |
39 | 39 | ||
40 | #[derive(Clone, Debug)] | 40 | #[derive(Clone, Debug)] |
41 | pub struct GroupLabel(pub String); | 41 | pub struct GroupLabel(pub String); |
42 | 42 | ||
43 | impl AssistLabel { | 43 | impl AssistLabel { |
44 | pub(crate) fn new(label: String, id: AssistId) -> AssistLabel { | 44 | pub(crate) fn new(id: AssistId, label: String) -> AssistLabel { |
45 | // FIXME: make fields private, so that this invariant can't be broken | 45 | // FIXME: make fields private, so that this invariant can't be broken |
46 | assert!(label.starts_with(|c: char| c.is_uppercase())); | 46 | assert!(label.starts_with(|c: char| c.is_uppercase())); |
47 | AssistLabel { label, id } | 47 | AssistLabel { label, id } |