aboutsummaryrefslogtreecommitdiff
path: root/crates/server/src/main.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-17 17:54:08 +0100
committerAleksey Kladov <[email protected]>2018-08-17 17:54:08 +0100
commited7ae78c6fd9e508f6e959c6a164cf8481f6b377 (patch)
tree556e8d4daffefa64dcdc5db8e75299514a0e85e4 /crates/server/src/main.rs
parent41570f60bf268c97223a864b8aa11a339929f55a (diff)
ServerWorld
Diffstat (limited to 'crates/server/src/main.rs')
-rw-r--r--crates/server/src/main.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/server/src/main.rs b/crates/server/src/main.rs
index 71d53199c..5e4c0fe7e 100644
--- a/crates/server/src/main.rs
+++ b/crates/server/src/main.rs
@@ -27,15 +27,14 @@ mod conv;
27mod main_loop; 27mod main_loop;
28mod vfs; 28mod vfs;
29mod path_map; 29mod path_map;
30mod server_world;
30 31
31use threadpool::ThreadPool; 32use threadpool::ThreadPool;
32use crossbeam_channel::bounded; 33use crossbeam_channel::bounded;
33use flexi_logger::{Logger, Duplicate}; 34use flexi_logger::{Logger, Duplicate};
34use libanalysis::WorldState;
35 35
36use ::{ 36use ::{
37 io::{Io, RawMsg, RawResponse, RawRequest, RawNotification}, 37 io::{Io, RawMsg, RawResponse, RawRequest, RawNotification},
38 path_map::PathMap,
39}; 38};
40 39
41pub type Result<T> = ::std::result::Result<T, ::failure::Error>; 40pub type Result<T> = ::std::result::Result<T, ::failure::Error>;
@@ -116,7 +115,6 @@ enum Task {
116 115
117fn initialized(io: &mut Io) -> Result<()> { 116fn initialized(io: &mut Io) -> Result<()> {
118 { 117 {
119 let mut world = WorldState::new();
120 let mut pool = ThreadPool::new(4); 118 let mut pool = ThreadPool::new(4);
121 let (task_sender, task_receiver) = bounded::<Task>(16); 119 let (task_sender, task_receiver) = bounded::<Task>(16);
122 let (fs_events_receiver, watcher) = vfs::watch(vec![ 120 let (fs_events_receiver, watcher) = vfs::watch(vec![
@@ -125,7 +123,6 @@ fn initialized(io: &mut Io) -> Result<()> {
125 info!("lifecycle: handshake finished, server ready to serve requests"); 123 info!("lifecycle: handshake finished, server ready to serve requests");
126 let res = main_loop::main_loop( 124 let res = main_loop::main_loop(
127 io, 125 io,
128 &mut world,
129 &mut pool, 126 &mut pool,
130 task_sender, 127 task_sender,
131 task_receiver.clone(), 128 task_receiver.clone(),