From c0c79ccbc036fb8b6ce1dfe9e1f57665b14ee7a0 Mon Sep 17 00:00:00 2001 From: Laura Abbott Date: Thu, 18 Dec 2025 23:57:09 +0000 Subject: [PATCH] Drop `as` conversion in inventory `as` will silently succed which is not what we want --- nexus/db-model/src/inventory.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nexus/db-model/src/inventory.rs b/nexus/db-model/src/inventory.rs index 7af0efad29b..a8c9f65897e 100644 --- a/nexus/db-model/src/inventory.rs +++ b/nexus/db-model/src/inventory.rs @@ -1692,7 +1692,7 @@ impl InvZoneManifestZone { sled_id: sled_id.into(), zone_file_name: artifact.file_name.clone(), path: artifact.path.clone().into(), - expected_size: artifact.expected_size as i64, + expected_size: artifact.expected_size.try_into().unwrap(), expected_sha256: artifact.expected_hash.into(), error: artifact.status.as_ref().err().cloned(), } @@ -1704,7 +1704,7 @@ impl From for ZoneArtifactInventory { Self { file_name: row.zone_file_name, path: row.path.into(), - expected_size: row.expected_size as u64, + expected_size: row.expected_size.try_into().unwrap(), expected_hash: row.expected_sha256.into(), status: match row.error { None => Ok(()),