chiark / gitweb /
currency: Promote image conversion
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 19 May 2022 19:36:41 +0000 (20:36 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 19 May 2022 19:54:44 +0000 (20:54 +0100)
Occult will want it earlier.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/currency.rs

index bce79d678414d4bb893333fa2be4f3f654949eee..1318788d609e41db7a7d77b95e14cfeaf3a10bd1 100644 (file)
@@ -79,9 +79,10 @@ impl PieceSpec for Spec {
     }
 
     let _value: &mut Value = gpc.xdata_mut(|| Value { qty })?;
+    let image: Arc<dyn InertPieceTrait> = image.into();
         
     let bnote = Banknote {
-      image: image.into(),
+      image,
       currency: currency.clone(),
       itemname, label_options, unit_size,
     };