From 56df5bdd8695b6f76245a86d959801b140f7c19d Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 7 Aug 2022 17:27:54 +0200 Subject: [PATCH] Don't take ownership of `CardType` when converting to `String` --- src/data/setbundle/type.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/setbundle/type.rs b/src/data/setbundle/type.rs index ca6a212..3f643a4 100644 --- a/src/data/setbundle/type.rs +++ b/src/data/setbundle/type.rs @@ -32,8 +32,8 @@ pub enum CardType { } -impl From for String { - fn from(r#type: CardType) -> Self { +impl From<&CardType> for String { + fn from(r#type: &CardType) -> Self { match r#type { CardType::Spell => String::from("Spell"), CardType::Unit => String::from("Unit"),