瀏覽代碼

Reduce compile times: use image::load_from_memory without format

Johannes Hofmann 7 年之前
父節點
當前提交
d0507bb8fb
共有 1 個檔案被更改,包括 1 行新增2 行删除
  1. 1
    2
      src/tile_atlas.rs

+ 1
- 2
src/tile_atlas.rs 查看文件

@@ -29,9 +29,8 @@ impl<'a> TileAtlas<'a> {
29 29
     fn init(&mut self) {
30 30
         // add tile for default slot
31 31
         {
32
-            let img = image::load_from_memory_with_format(
32
+            let img = image::load_from_memory(
33 33
                 include_bytes!("../img/no_tile.png"),
34
-                image::ImageFormat::PNG,
35 34
             ).unwrap();
36 35
             self.texture.sub_image(0, 0, &img);
37 36
         }