From e6e9cb348e3ff975ee281ac258e8e00a7feacfaf Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 10 Aug 2020 13:41:22 +1000 Subject: [PATCH] show ordinal if card template missing --- rslib/src/notetype/emptycards.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rslib/src/notetype/emptycards.rs b/rslib/src/notetype/emptycards.rs index ce85375d2..8ee67977d 100644 --- a/rslib/src/notetype/emptycards.rs +++ b/rslib/src/notetype/emptycards.rs @@ -97,7 +97,7 @@ impl Collection { nt.templates .get(*ord as usize) .map(|t| t.name.clone()) - .unwrap_or_default() + .unwrap_or_else(|| format!("Card {}", *ord + 1)) }) .collect::>() .join(", "),