diff options
author | Aleksey Kladov <[email protected]> | 2019-02-24 10:53:35 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-02-24 11:00:00 +0000 |
commit | ef442b8682909f2ab758f55507d4c2e81673cfa1 (patch) | |
tree | ea042b5ff65f74b9f336de62879eefaa7e8ca2bc /crates/ra_assists/src/lib.rs | |
parent | f6f160391db945a0dcc2f73b38926d6919f7c566 (diff) |
Assign IDs to assists
Diffstat (limited to 'crates/ra_assists/src/lib.rs')
-rw-r--r-- | crates/ra_assists/src/lib.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/ra_assists/src/lib.rs b/crates/ra_assists/src/lib.rs index e1e899edc..56d276867 100644 --- a/crates/ra_assists/src/lib.rs +++ b/crates/ra_assists/src/lib.rs | |||
@@ -16,10 +16,16 @@ use hir::db::HirDatabase; | |||
16 | 16 | ||
17 | pub(crate) use crate::assist_ctx::{AssistCtx, Assist}; | 17 | pub(crate) use crate::assist_ctx::{AssistCtx, Assist}; |
18 | 18 | ||
19 | /// Unique identifier of the assist, should not be shown to the user | ||
20 | /// directly. | ||
21 | #[derive(Debug, Clone, Copy, PartialEq, Eq)] | ||
22 | pub struct AssistId(pub &'static str); | ||
23 | |||
19 | #[derive(Debug, Clone)] | 24 | #[derive(Debug, Clone)] |
20 | pub struct AssistLabel { | 25 | pub struct AssistLabel { |
21 | /// Short description of the assist, as shown in the UI. | 26 | /// Short description of the assist, as shown in the UI. |
22 | pub label: String, | 27 | pub label: String, |
28 | pub id: AssistId, | ||
23 | } | 29 | } |
24 | 30 | ||
25 | #[derive(Debug, Clone)] | 31 | #[derive(Debug, Clone)] |