Skip to content

Commit

Permalink
Fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
maxammann committed Oct 3, 2023
1 parent d24f75a commit f1a03f3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions maplibre/src/headless/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub async fn create_headless_renderer(
cache_path: Option<String>,
) -> (Kernel<HeadlessEnvironment>, 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(),
))
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion maplibre/src/headless/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
}
Expand Down
2 changes: 1 addition & 1 deletion maplibre/src/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
}
Expand Down

0 comments on commit f1a03f3

Please sign in to comment.