mindustry logic execution, map- and schematic- parsing and rendering
Diffstat (limited to 'src/block/simple.rs')
-rw-r--r--src/block/simple.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/block/simple.rs b/src/block/simple.rs
index 1c00079..329e58d 100644
--- a/src/block/simple.rs
+++ b/src/block/simple.rs
@@ -15,7 +15,7 @@ macro_rules! state_impl {
fn create_state(val: $type) -> $crate::block::State
where Self: Sized {
- Box::new(val)
+ State::from(val)
}
};
}
@@ -65,10 +65,6 @@ macro_rules! make_simple {
Ok(None)
}
- fn clone_state(&self, _: &crate::block::State) -> crate::block::State {
- panic!("{} has no custom state", stringify!($name))
- }
-
fn mirror_state(&self, _: &mut crate::block::State, _: bool, _: bool) {
panic!("{} has no custom state", stringify!($name));
}