Unnamed repository; edit this file 'description' to name the repository.
Less clones
Kirill Bulatov 2024-09-23
parent 950bb83 · commit 983f2ab
-rw-r--r--crates/rust-analyzer/src/handlers/request.rs2
-rw-r--r--crates/rust-analyzer/src/lsp/capabilities.rs8
2 files changed, 5 insertions, 5 deletions
diff --git a/crates/rust-analyzer/src/handlers/request.rs b/crates/rust-analyzer/src/handlers/request.rs
index 80d8c53801..5eab96e245 100644
--- a/crates/rust-analyzer/src/handlers/request.rs
+++ b/crates/rust-analyzer/src/handlers/request.rs
@@ -1061,7 +1061,7 @@ pub(crate) fn handle_completion_resolve(
let position = FilePosition { file_id, offset };
let Some(unresolved_completions) = snap.analysis.completions(
- &&forced_resolve_completions_config,
+ &forced_resolve_completions_config,
position,
resolve_data.trigger_character,
)?
diff --git a/crates/rust-analyzer/src/lsp/capabilities.rs b/crates/rust-analyzer/src/lsp/capabilities.rs
index e5df7947f2..3b19284f24 100644
--- a/crates/rust-analyzer/src/lsp/capabilities.rs
+++ b/crates/rust-analyzer/src/lsp/capabilities.rs
@@ -448,7 +448,7 @@ impl ClientCapabilities {
.unwrap_or_default()
}
- pub fn inlay_hint_resolve_support_properties(&self) -> FxHashSet<String> {
+ pub fn inlay_hint_resolve_support_properties(&self) -> FxHashSet<&str> {
self.0
.text_document
.as_ref()
@@ -457,11 +457,11 @@ impl ClientCapabilities {
.map(|inlay_resolve| inlay_resolve.properties.iter())
.into_iter()
.flatten()
- .cloned()
+ .map(|s| s.as_str())
.collect()
}
- pub fn completion_resolve_support_properties(&self) -> FxHashSet<String> {
+ pub fn completion_resolve_support_properties(&self) -> FxHashSet<&str> {
self.0
.text_document
.as_ref()
@@ -471,7 +471,7 @@ impl ClientCapabilities {
.map(|resolve_support| resolve_support.properties.iter())
.into_iter()
.flatten()
- .cloned()
+ .map(|s| s.as_str())
.collect()
}