Skip to content

Commit

Permalink
Add Clone trait to offline map structs (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
shanemadden authored Jul 19, 2024
1 parent a6afe91 commit ca47f73
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/offline_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use serde::{

const ROOM_AREA: usize = (ROOM_SIZE as usize) * (ROOM_SIZE as usize);

#[derive(Deserialize, Debug)]
#[derive(Clone, Deserialize, Debug)]
pub struct OfflineShardData {
/// A text description of the map dump
pub description: String,
Expand All @@ -21,7 +21,7 @@ pub struct OfflineShardData {
pub rooms: HashMap<RoomName, OfflineRoomData>,
}

#[derive(Deserialize, Debug)]
#[derive(Clone, Deserialize, Debug)]
pub struct OfflineRoomData {
#[serde(rename = "room")]
pub room_name: RoomName,
Expand All @@ -35,7 +35,7 @@ pub struct OfflineRoomData {
pub objects: Vec<OfflineObject>,
}

#[derive(Deserialize, Debug)]
#[derive(Clone, Deserialize, Debug)]
#[serde(rename_all = "camelCase", tag = "type")]
pub enum OfflineObject {
#[serde(rename_all = "camelCase")]
Expand Down Expand Up @@ -118,7 +118,7 @@ pub enum OfflineObject {
Unknown,
}

#[derive(Deserialize, Debug)]
#[derive(Clone, Deserialize, Debug)]
#[serde(untagged)]
pub enum OfflinePortalDestination {
InterRoom {
Expand Down

0 comments on commit ca47f73

Please sign in to comment.