From d79db3c1f950d24aa6390721a580ca85afdf5d5a Mon Sep 17 00:00:00 2001 From: he1pa <18012015693@163.com> Date: Thu, 28 Dec 2023 17:38:14 +0800 Subject: [PATCH] fix cargo clippy error Signed-off-by: he1pa <18012015693@163.com> --- kclvm/tools/src/LSP/src/semantic_token.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kclvm/tools/src/LSP/src/semantic_token.rs b/kclvm/tools/src/LSP/src/semantic_token.rs index 565b084f3..b38a54f78 100644 --- a/kclvm/tools/src/LSP/src/semantic_token.rs +++ b/kclvm/tools/src/LSP/src/semantic_token.rs @@ -73,7 +73,7 @@ pub(crate) fn semantic_tokens_full(file: &str, gs: &GlobalState) -> Option, ) -> Vec { tokens.sort_by(|a, b| { @@ -93,8 +93,8 @@ pub fn kcl_semantic_tokens_to_semantic_tokens( .iter() .map(|obj| { // ref: https://github.com/microsoft/vscode-extension-samples/blob/5ae1f7787122812dcc84e37427ca90af5ee09f14/semantic-tokens-sample/vscode.proposed.d.ts#L71 - //A file can contain many tokens, perhaps even hundreds of thousands of tokens. Therefore, to improve - //the memory consumption around describing semantic tokens, we have decided to avoid allocating an object + // A file can contain many tokens, perhaps even hundreds of thousands of tokens. Therefore, to improve + // the memory consumption around describing semantic tokens, we have decided to avoid allocating an object // for each token and we represent tokens from a file as an array of integers. Furthermore, the position // of each token is expressed relative to the token before it because most tokens remain stable relative to // each other when edits are made in a file.