1
Fork 0
mirror of https://github.com/Steffo99/patched-porobot.git synced 2024-12-22 17:44:22 +00:00

Don't take ownership of CardType when converting to String

This commit is contained in:
Steffo 2022-08-07 17:27:54 +02:00
parent fb34162fef
commit 56df5bdd86
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -32,8 +32,8 @@ pub enum CardType {
} }
impl From<CardType> for String { impl From<&CardType> for String {
fn from(r#type: CardType) -> Self { fn from(r#type: &CardType) -> Self {
match r#type { match r#type {
CardType::Spell => String::from("Spell"), CardType::Spell => String::from("Spell"),
CardType::Unit => String::from("Unit"), CardType::Unit => String::from("Unit"),