mindustry logic execution, map- and schematic- parsing and rendering
Diffstat (limited to 'src/data/schematic.rs')
| -rw-r--r-- | src/data/schematic.rs | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/data/schematic.rs b/src/data/schematic.rs index 25d2cb7..6dea884 100644 --- a/src/data/schematic.rs +++ b/src/data/schematic.rs @@ -19,6 +19,7 @@ pub const MAX_DIMENSION: usize = 256; pub const MAX_BLOCKS: u32 = 256 * 256; /// a placement in a schematic +#[derive(Clone)] pub struct Placement<'l> { pub block: &'l Block, pub rot: Rotation, @@ -115,17 +116,6 @@ impl RotationState for Option<Placement<'_>> { } } -// manual impl because trait objects cannot be cloned -impl<'l> Clone for Placement<'l> { - fn clone(&self) -> Self { - Self { - block: self.block, - state: self.state.as_ref().map(|s| self.block.clone_state(s)), - rot: self.rot, - } - } -} - #[derive(Clone, Debug)] /// a schematic. pub struct Schematic<'l> { |