From b7403c6e0ed8286458e3d8237cac672a821fae7b Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 7 Aug 2022 17:32:40 +0200 Subject: [PATCH] Use reference in `String::from::<&CardType>` call --- src/search/cardsearch.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search/cardsearch.rs b/src/search/cardsearch.rs index 73ec6da..54984eb 100644 --- a/src/search/cardsearch.rs +++ b/src/search/cardsearch.rs @@ -211,7 +211,7 @@ impl CardSearchEngine { doc!( fields.code => card.code, fields.name => card.name, - fields.r#type => String::from(card.r#type), + fields.r#type => String::from(&card.r#type), fields.set => card.set .localized(&globals.sets) .map(|cs| cs.name.to_owned())