diff options
author | kjeremy <[email protected]> | 2020-03-30 17:07:27 +0100 |
---|---|---|
committer | kjeremy <[email protected]> | 2020-03-30 17:07:27 +0100 |
commit | d4c317320d58fa5d31eab6f3533c14ad2c12d78d (patch) | |
tree | f33561c0a48dfeca9a029852d15352661084734c /crates/rust-analyzer/src/semantic_tokens.rs | |
parent | 671926ac93f0ff921758a919eaf87c056979189f (diff) |
Simplify SemanticTokensBuilder build method
This matches the next stable vscode api
Diffstat (limited to 'crates/rust-analyzer/src/semantic_tokens.rs')
-rw-r--r-- | crates/rust-analyzer/src/semantic_tokens.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/rust-analyzer/src/semantic_tokens.rs b/crates/rust-analyzer/src/semantic_tokens.rs index d9ba77050..2a66bbfd8 100644 --- a/crates/rust-analyzer/src/semantic_tokens.rs +++ b/crates/rust-analyzer/src/semantic_tokens.rs | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | use std::ops; | 3 | use std::ops; |
4 | 4 | ||
5 | use lsp_types::{Range, SemanticToken, SemanticTokenModifier, SemanticTokenType}; | 5 | use lsp_types::{Range, SemanticToken, SemanticTokenModifier, SemanticTokenType, SemanticTokens}; |
6 | 6 | ||
7 | pub(crate) const ATTRIBUTE: SemanticTokenType = SemanticTokenType::new("attribute"); | 7 | pub(crate) const ATTRIBUTE: SemanticTokenType = SemanticTokenType::new("attribute"); |
8 | pub(crate) const BUILTIN_TYPE: SemanticTokenType = SemanticTokenType::new("builtinType"); | 8 | pub(crate) const BUILTIN_TYPE: SemanticTokenType = SemanticTokenType::new("builtinType"); |
@@ -109,8 +109,8 @@ impl SemanticTokensBuilder { | |||
109 | self.prev_char = range.start.character as u32; | 109 | self.prev_char = range.start.character as u32; |
110 | } | 110 | } |
111 | 111 | ||
112 | pub fn build(self) -> Vec<SemanticToken> { | 112 | pub fn build(self) -> SemanticTokens { |
113 | self.data | 113 | SemanticTokens { result_id: None, data: self.data } |
114 | } | 114 | } |
115 | } | 115 | } |
116 | 116 | ||