create module smartly

This commit is contained in:
Aleksey Kladov 2018-08-28 18:22:52 +03:00
parent 748a4cacd2
commit d34588bf83
12 changed files with 344 additions and 182 deletions

View file

@ -87,11 +87,8 @@ impl ServerWorldState {
}
pub fn snapshot(&self) -> ServerWorld {
let pm = self.path_map.clone();
ServerWorld {
analysis: self.analysis.snapshot(move |id, path| {
pm.resolve(id, path)
}),
analysis: self.analysis.snapshot(self.path_map.clone()),
path_map: self.path_map.clone()
}
}