Sfoglia il codice sorgente

Reduce compile times: use image::load_from_memory without format

Johannes Hofmann 7 anni fa
parent
commit
d0507bb8fb
1 ha cambiato i file con 1 aggiunte e 2 eliminazioni
  1. 1
    2
      src/tile_atlas.rs

+ 1
- 2
src/tile_atlas.rs Vedi File

@@ -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
         }