remove clones
This commit is contained in:
parent
bbcd998433
commit
85ff328d31
4 changed files with 5 additions and 6 deletions
|
@ -162,7 +162,7 @@ impl Query {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
#[derive(Debug)]
|
||||
pub struct Analysis {
|
||||
imp: AnalysisImpl
|
||||
}
|
||||
|
|
|
@ -478,7 +478,7 @@ pub fn handle_code_action(
|
|||
}
|
||||
|
||||
pub fn publish_diagnostics(
|
||||
world: ServerWorld,
|
||||
world: &ServerWorld,
|
||||
file_id: FileId,
|
||||
) -> Result<req::PublishDiagnosticsParams> {
|
||||
let uri = world.file_id_to_uri(file_id)?;
|
||||
|
@ -497,7 +497,7 @@ pub fn publish_diagnostics(
|
|||
}
|
||||
|
||||
pub fn publish_decorations(
|
||||
world: ServerWorld,
|
||||
world: &ServerWorld,
|
||||
file_id: FileId,
|
||||
) -> Result<req::PublishDecorationsParams> {
|
||||
let uri = world.file_id_to_uri(file_id)?;
|
||||
|
|
|
@ -391,7 +391,7 @@ fn update_file_notifications_on_threadpool(
|
|||
) {
|
||||
pool.spawn(move || {
|
||||
for file_id in subscriptions {
|
||||
match handlers::publish_diagnostics(world.clone(), file_id) {
|
||||
match handlers::publish_diagnostics(&world, file_id) {
|
||||
Err(e) => {
|
||||
error!("failed to compute diagnostics: {:?}", e)
|
||||
}
|
||||
|
@ -400,7 +400,7 @@ fn update_file_notifications_on_threadpool(
|
|||
sender.send(Task::Notify(not));
|
||||
}
|
||||
}
|
||||
match handlers::publish_decorations(world.clone(), file_id) {
|
||||
match handlers::publish_decorations(&world, file_id) {
|
||||
Err(e) => {
|
||||
error!("failed to compute decorations: {:?}", e)
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ pub struct ServerWorldState {
|
|||
pub mem_map: FxHashMap<FileId, Option<String>>,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct ServerWorld {
|
||||
pub workspaces: Arc<Vec<CargoWorkspace>>,
|
||||
pub analysis: Analysis,
|
||||
|
|
Loading…
Add table
Reference in a new issue