test(lsp): compare server roots without cloning into a slice (#7087)

The Xcode C-family test added in #7023 built a one-element array by cloning the root, which clippy's cloned_ref_to_slice_refs rejects under -D warnings, so the three Rust CI jobs failed to compile ide-lsp's mock_server test. It now compares against std::slice::from_ref.
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-12-01 00:45:21 +08:00
1 джерело 635da15486
коміт dfae46868c
1 file changed
+1 -1
+1 -1
Переглянути файл
@@ -8859,7 +8859,7 @@ async fn c_family_files_use_sourcekit_lsp_only_with_an_xcode_bsp_config() {
h.wait_status("sourcekit-lsp", ServerStatus::Ready).await;
eventually(|| h.launcher.state("sourcekit-lsp").docs.lock().contains_key(&uri_of(&path))).await;
assert!(h.statuses("clangd").is_empty(), "{language}");
assert_eq!(h.mgr.servers().iter().map(|s| s.root.clone()).collect::<Vec<_>>(), [h.root.clone()]);
assert_eq!(h.mgr.servers().iter().map(|s| s.root.clone()).collect::<Vec<_>>(), std::slice::from_ref(&h.root));
h.mgr.shutdown_all().await;
// sourcekit-lsp not installed: clangd still serves.