Unnamed repository; edit this file 'description' to name the repository.
impl deref
bendn 2 months ago
parent a08dfb6 · commit cd46a45
-rw-r--r--helix-lsp-types/src/code_action.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/helix-lsp-types/src/code_action.rs b/helix-lsp-types/src/code_action.rs
index 4029bfd6..eed0e33e 100644
--- a/helix-lsp-types/src/code_action.rs
+++ b/helix-lsp-types/src/code_action.rs
@@ -150,7 +150,15 @@ impl From<CodeAction> for CodeActionOrCommand {
}
#[derive(Debug, Eq, PartialEq, Hash, PartialOrd, Clone, Deserialize, Serialize)]
-pub struct CodeActionKind(Cow<'static, str>);
+pub struct CodeActionKind(pub Cow<'static, str>);
+
+impl std::ops::Deref for CodeActionKind {
+ type Target = str;
+
+ fn deref(&self) -> &Self::Target {
+ self.as_str()
+ }
+}
impl CodeActionKind {
/// Empty kind.