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:
parent
fb34162fef
commit
56df5bdd86
1 changed files with 2 additions and 2 deletions
|
@ -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"),
|
||||||
|
|
Loading…
Reference in a new issue