Skip to content

Commit b82c5ce

Browse files
Less clones
1 parent ecae5a8 commit b82c5ce

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/request.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ pub(crate) fn handle_completion_resolve(
10611061

10621062
let position = FilePosition { file_id, offset };
10631063
let Some(unresolved_completions) = snap.analysis.completions(
1064-
&&forced_resolve_completions_config,
1064+
&forced_resolve_completions_config,
10651065
position,
10661066
resolve_data.trigger_character,
10671067
)?

src/tools/rust-analyzer/crates/rust-analyzer/src/lsp/capabilities.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ impl ClientCapabilities {
448448
.unwrap_or_default()
449449
}
450450

451-
pub fn inlay_hint_resolve_support_properties(&self) -> FxHashSet<String> {
451+
pub fn inlay_hint_resolve_support_properties(&self) -> FxHashSet<&str> {
452452
self.0
453453
.text_document
454454
.as_ref()
@@ -457,11 +457,11 @@ impl ClientCapabilities {
457457
.map(|inlay_resolve| inlay_resolve.properties.iter())
458458
.into_iter()
459459
.flatten()
460-
.cloned()
460+
.map(|s| s.as_str())
461461
.collect()
462462
}
463463

464-
pub fn completion_resolve_support_properties(&self) -> FxHashSet<String> {
464+
pub fn completion_resolve_support_properties(&self) -> FxHashSet<&str> {
465465
self.0
466466
.text_document
467467
.as_ref()
@@ -471,7 +471,7 @@ impl ClientCapabilities {
471471
.map(|resolve_support| resolve_support.properties.iter())
472472
.into_iter()
473473
.flatten()
474-
.cloned()
474+
.map(|s| s.as_str())
475475
.collect()
476476
}
477477

0 commit comments

Comments
 (0)