From c8ab6337d26d606ce003fe747af3eff6e57f4c03 Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Sun, 29 May 2022 23:20:54 -0400 Subject: ships: Make DbShip take all primitive types Sha256 does not deserialize from postgres, so it's converted after fetching from the database --- src/ship.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ship.rs') 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 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 } -- cgit v1.2.3