replace into with from

into come for free
main
Zynh0722 2023-11-02 15:26:47 -07:00
parent 6ed5be6467
commit 739b312fdd
1 changed files with 5 additions and 5 deletions

View File

@ -63,12 +63,12 @@ struct DrinkForm {
quantity: u32,
}
impl Into<NewDrink> for DrinkForm {
fn into(self) -> NewDrink {
impl From<DrinkForm> 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,
}
}
}