1
Fork 0
mirror of https://github.com/Steffo99/patched-porobot.git synced 2024-12-22 09:34:21 +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 {
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"),