diff --git a/src/api.rs b/src/api.rs index 703880d..5a2b2b2 100644 --- a/src/api.rs +++ b/src/api.rs @@ -63,12 +63,12 @@ struct DrinkForm { quantity: u32, } -impl Into for DrinkForm { - fn into(self) -> NewDrink { +impl From for NewDrink { + fn from(value: DrinkForm) -> Self { NewDrink { - price: self.price, - quantity: self.quantity, - shift: self.shift_id, + price: value.price, + quantity: value.quantity, + shift: value.shift_id, } } }