aboutsummaryrefslogtreecommitdiff
path: root/crates/server/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/server/src')
-rw-r--r--crates/server/src/main_loop/mod.rs6
-rw-r--r--crates/server/src/server_world.rs2
2 files changed, 4 insertions, 4 deletions
diff --git a/crates/server/src/main_loop/mod.rs b/crates/server/src/main_loop/mod.rs
index ad7c480dc..12a903dac 100644
--- a/crates/server/src/main_loop/mod.rs
+++ b/crates/server/src/main_loop/mod.rs
@@ -94,7 +94,7 @@ pub(super) fn main_loop(
94 Event::Msg(msg) => { 94 Event::Msg(msg) => {
95 match msg { 95 match msg {
96 RawMsg::Request(req) => { 96 RawMsg::Request(req) => {
97 if !on_request(io, &state, pool, &task_sender, req)? { 97 if !on_request(io, &mut state, pool, &task_sender, req)? {
98 return Ok(()); 98 return Ok(());
99 } 99 }
100 } 100 }
@@ -114,7 +114,7 @@ pub(super) fn main_loop(
114 114
115fn on_request( 115fn on_request(
116 io: &mut Io, 116 io: &mut Io,
117 world: &ServerWorldState, 117 world: &mut ServerWorldState,
118 pool: &ThreadPool, 118 pool: &ThreadPool,
119 sender: &Sender<Task>, 119 sender: &Sender<Task>,
120 req: RawRequest, 120 req: RawRequest,
@@ -252,7 +252,7 @@ fn on_notification(
252fn handle_request_on_threadpool<R: req::ClientRequest>( 252fn handle_request_on_threadpool<R: req::ClientRequest>(
253 req: &mut Option<RawRequest>, 253 req: &mut Option<RawRequest>,
254 pool: &ThreadPool, 254 pool: &ThreadPool,
255 world: &ServerWorldState, 255 world: &mut ServerWorldState,
256 sender: &Sender<Task>, 256 sender: &Sender<Task>,
257 f: fn(ServerWorld, R::Params) -> Result<R::Result>, 257 f: fn(ServerWorld, R::Params) -> Result<R::Result>,
258) -> Result<()> 258) -> Result<()>
diff --git a/crates/server/src/server_world.rs b/crates/server/src/server_world.rs
index c0d2efb86..9850822cd 100644
--- a/crates/server/src/server_world.rs
+++ b/crates/server/src/server_world.rs
@@ -86,7 +86,7 @@ impl ServerWorldState {
86 Ok(()) 86 Ok(())
87 } 87 }
88 88
89 pub fn snapshot(&self) -> ServerWorld { 89 pub fn snapshot(&mut self) -> ServerWorld {
90 let pm = self.path_map.clone(); 90 let pm = self.path_map.clone();
91 ServerWorld { 91 ServerWorld {
92 analysis: self.analysis.snapshot(move |id, path| { 92 analysis: self.analysis.snapshot(move |id, path| {