chiark / gitweb /
currency: Restructure slightly to make next log changes easier
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 19 May 2022 19:52:32 +0000 (20:52 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 19 May 2022 19:54:44 +0000 (20:54 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/currency.rs

index 19107c85088b0d91283efdd9c016273b25752a3a..2dcd0dcbb60bbbb2f92e38c2d0e7d3c25933fa7a 100644 (file)
@@ -259,7 +259,7 @@ impl PieceTrait for Banknote {
       else return Ok(default()); // arithmetic overflow!
     }
 
-    let logents = vec![ LogEntry { html: hformat!(
+    let logent = hformat!(
       "{} deposited {}, giving {}{}",
       match gpl {
         Some(gpl) => gpl.nick.to_html(),
@@ -267,7 +267,9 @@ impl PieceTrait for Banknote {
       },
       tipc.p.show(show).describe_html(tgpc, goccults)?,
       new_qty, currency,
-    )}];
+    );
+
+    let logents = vec![ LogEntry { html: logent } ];
 
   OpHookThunk::Reborrow(Box::new(move |igg: &mut InstanceGuard, (_player,)| {