From ef442b8682909f2ab758f55507d4c2e81673cfa1 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 24 Feb 2019 13:53:35 +0300 Subject: Assign IDs to assists --- crates/ra_assists/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crates/ra_assists/src/lib.rs') 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; pub(crate) use crate::assist_ctx::{AssistCtx, Assist}; +/// Unique identifier of the assist, should not be shown to the user +/// directly. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub struct AssistId(pub &'static str); + #[derive(Debug, Clone)] pub struct AssistLabel { /// Short description of the assist, as shown in the UI. pub label: String, + pub id: AssistId, } #[derive(Debug, Clone)] -- cgit v1.2.3