aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCara Salter <cara@devcara.com>2022-06-10 10:08:01 -0400
committerCara Salter <cara@devcara.com>2022-06-10 10:08:01 -0400
commit641f2a38b1185394e91e834709d9b4dc8473a054 (patch)
treef7192a27bb8059988ec1921350c812f9b211206a
parent4f4a5a669061e362656895e273b9f4776f682972 (diff)
downloadsolarlib-641f2a38b1185394e91e834709d9b4dc8473a054.tar.gz
solarlib-641f2a38b1185394e91e834709d9b4dc8473a054.zip
ship: Implement Clone
-rw-r--r--src/ship.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ship.rs b/src/ship.rs
index ed2d95c..228ec9a 100644
--- a/src/ship.rs
+++ b/src/ship.rs
@@ -10,7 +10,7 @@ use crate::{errors::Error, star::Star};
use serde::{Serialize, Deserialize};
/// Describes a hash of a file
-#[derive(Serialize, Deserialize, Debug)]
+#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Sha256(pub String);
impl FromStr for Sha256 {
@@ -29,7 +29,7 @@ impl ToString for Sha256 {
}
/// Describes a starship, or a way to install a distribution
-#[derive(Serialize, Deserialize, Debug)]
+#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Ship {
/// The common name of the distribution (e.g "Arch Linux")
pub name: String,
@@ -42,7 +42,7 @@ pub struct Ship {
}
/// Describes a starship generated from a database
-#[derive(Serialize, Deserialize, Debug)]
+#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct DbShip {
/// The Database ID of the ship
pub id: i32,