Przeglądaj źródła

Reduce compile times: use image::load_from_memory without format

Johannes Hofmann 8 lat temu
rodzic
commit
d0507bb8fb
1 zmienionych plików z 1 dodań i 2 usunięć
  1. 1
    2
      src/tile_atlas.rs

+ 1
- 2
src/tile_atlas.rs Wyświetl plik

29
     fn init(&mut self) {
29
     fn init(&mut self) {
30
         // add tile for default slot
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
                 include_bytes!("../img/no_tile.png"),
33
                 include_bytes!("../img/no_tile.png"),
34
-                image::ImageFormat::PNG,
35
             ).unwrap();
34
             ).unwrap();
36
             self.texture.sub_image(0, 0, &img);
35
             self.texture.sub_image(0, 0, &img);
37
         }
36
         }