mindustry logic execution, map- and schematic- parsing and rendering
unwrap unchecked in warmup
bendn 2023-08-03
parent c2eaf97 · commit dac52dc
-rw-r--r--Cargo.toml2
-rw-r--r--build.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 8b157e8..a7e2ad8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "mindus"
-version = "1.5.1"
+version = "1.5.2"
edition = "2021"
description = "A library for working with mindustry data formats (eg schematics and maps) (fork of plandustry)"
authors = [
diff --git a/build.rs b/build.rs
index 3921cad..0f28ac0 100644
--- a/build.rs
+++ b/build.rs
@@ -61,7 +61,7 @@ fn main() {
let y = new.height();
buf.write_all(&new.into_raw()).unwrap();
writeln!($ext,
- r#" "{path}" => r!(RgbaImage::from_vec({x}, {y}, include_bytes!(concat!(env!("OUT_DIR"), "/{n}-{}")).to_vec()).unwrap()),"#,
+ r#" "{path}" => r!(unsafe {{ RgbaImage::from_vec({x}, {y}, include_bytes!(concat!(env!("OUT_DIR"), "/{n}-{}")).to_vec()).unwrap_unchecked() }}),"#,
stringify!($ext)
).unwrap();
};