aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCara Salter <cara@devcara.com>2022-05-29 23:20:54 -0400
committerCara Salter <cara@devcara.com>2022-05-29 23:20:54 -0400
commitc8ab6337d26d606ce003fe747af3eff6e57f4c03 (patch)
tree90ae2a8a0790f66d02311f6331b66c7d83994674 /src
parentd64db7ab0a3180df867b931fb078ec820cb1c9d7 (diff)
downloadsolarlib-c8ab6337d26d606ce003fe747af3eff6e57f4c03.tar.gz
solarlib-c8ab6337d26d606ce003fe747af3eff6e57f4c03.zip
ships: Make DbShip take all primitive types
Sha256 does not deserialize from postgres, so it's converted after fetching from the database
Diffstat (limited to 'src')
-rw-r--r--src/ship.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ship.rs b/src/ship.rs
index bcb6981..f38d1f9 100644
--- a/src/ship.rs
+++ b/src/ship.rs
@@ -48,7 +48,7 @@ pub struct DbShip {
pub id: i32,
pub name: String,
- pub shasum: Sha256,
+ pub shasum: String,
pub download_url: String,
pub version: String
}
@@ -57,7 +57,7 @@ impl From<DbShip> for Ship {
fn from(o: DbShip) -> Self {
Self {
name: o.name,
- shasum: o.shasum,
+ shasum: Sha256(o.shasum),
download_url: o.download_url,
version: o.version
}