mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 21:54:42 +00:00
Less clones
This commit is contained in:
parent
950bb83f81
commit
983f2abc2c
2 changed files with 5 additions and 5 deletions
|
@ -1061,7 +1061,7 @@ pub(crate) fn handle_completion_resolve(
|
||||||
|
|
||||||
let position = FilePosition { file_id, offset };
|
let position = FilePosition { file_id, offset };
|
||||||
let Some(unresolved_completions) = snap.analysis.completions(
|
let Some(unresolved_completions) = snap.analysis.completions(
|
||||||
&&forced_resolve_completions_config,
|
&forced_resolve_completions_config,
|
||||||
position,
|
position,
|
||||||
resolve_data.trigger_character,
|
resolve_data.trigger_character,
|
||||||
)?
|
)?
|
||||||
|
|
|
@ -448,7 +448,7 @@ impl ClientCapabilities {
|
||||||
.unwrap_or_default()
|
.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
|
self.0
|
||||||
.text_document
|
.text_document
|
||||||
.as_ref()
|
.as_ref()
|
||||||
|
@ -457,11 +457,11 @@ impl ClientCapabilities {
|
||||||
.map(|inlay_resolve| inlay_resolve.properties.iter())
|
.map(|inlay_resolve| inlay_resolve.properties.iter())
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.flatten()
|
.flatten()
|
||||||
.cloned()
|
.map(|s| s.as_str())
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn completion_resolve_support_properties(&self) -> FxHashSet<String> {
|
pub fn completion_resolve_support_properties(&self) -> FxHashSet<&str> {
|
||||||
self.0
|
self.0
|
||||||
.text_document
|
.text_document
|
||||||
.as_ref()
|
.as_ref()
|
||||||
|
@ -471,7 +471,7 @@ impl ClientCapabilities {
|
||||||
.map(|resolve_support| resolve_support.properties.iter())
|
.map(|resolve_support| resolve_support.properties.iter())
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.flatten()
|
.flatten()
|
||||||
.cloned()
|
.map(|s| s.as_str())
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue