Skip to content

Commit 8984645

Browse files
committed
remove unnecessary code from wasm builds
1 parent 9978314 commit 8984645

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/saveload_system.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
#[cfg(not(target_arch = "wasm32"))]
2+
use std::fs::File;
13
use std::{
2-
fs::{self, File},
4+
fs::{self},
35
path::Path,
46
};
57

@@ -10,6 +12,7 @@ use crate::{components::*, delete_state};
1012

1113
const SAVE_FILE: &str = "savegame.json";
1214

15+
#[cfg(not(target_arch = "wasm32"))]
1316
macro_rules! serialize_individually {
1417
($ecs:expr, $ser:expr, $data:expr, $( $type:ty),*, $(,)?) => {
1518
$(

0 commit comments

Comments
 (0)