From f1a03f3fef05e0fd9b5ef1cbd2a374af41910be0 Mon Sep 17 00:00:00 2001 From: Maximilian Ammann Date: Tue, 3 Oct 2023 20:39:37 +0100 Subject: [PATCH] Fix compilation --- maplibre/src/headless/mod.rs | 4 ++-- maplibre/src/headless/window.rs | 2 +- maplibre/src/render/mod.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/maplibre/src/headless/mod.rs b/maplibre/src/headless/mod.rs index e150fef4a..1ed51d4d2 100644 --- a/maplibre/src/headless/mod.rs +++ b/maplibre/src/headless/mod.rs @@ -32,7 +32,7 @@ pub async fn create_headless_renderer( cache_path: Option, ) -> (Kernel, Renderer) { let client = ReqwestHttpClient::new(cache_path); - let kernel = KernelBuilder::new() + let mut kernel = KernelBuilder::new() .with_map_window_config(HeadlessMapWindowConfig::new( WindowSize::new(tile_size, tile_size).unwrap(), )) @@ -41,7 +41,7 @@ pub async fn create_headless_renderer( .with_scheduler(TokioScheduler::new()) .build(); - let mwc: &HeadlessMapWindowConfig = kernel.map_window_config(); + let mwc: HeadlessMapWindowConfig = kernel.take_map_window_config(); let window: HeadlessMapWindow = mwc.create(); let renderer = RendererBuilder::new() diff --git a/maplibre/src/headless/window.rs b/maplibre/src/headless/window.rs index 164549626..1110448d0 100644 --- a/maplibre/src/headless/window.rs +++ b/maplibre/src/headless/window.rs @@ -13,7 +13,7 @@ impl HeadlessMapWindowConfig { impl MapWindowConfig for HeadlessMapWindowConfig { type MapWindow = HeadlessMapWindow; - fn create(&self) -> Self::MapWindow { + fn create(self) -> Self::MapWindow { Self::MapWindow { size: self.size } } } diff --git a/maplibre/src/render/mod.rs b/maplibre/src/render/mod.rs index f75b76c47..16bbff7bd 100644 --- a/maplibre/src/render/mod.rs +++ b/maplibre/src/render/mod.rs @@ -430,7 +430,7 @@ mod tests { impl MapWindowConfig for HeadlessMapWindowConfig { type MapWindow = HeadlessMapWindow; - fn create(&self) -> Self::MapWindow { + fn create(self) -> Self::MapWindow { Self::MapWindow { size: self.size } } }