Skip to content

Commit

Permalink
style(api/pricing): remove unnecessary clone
Browse files Browse the repository at this point in the history
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
  • Loading branch information
gierens committed Oct 23, 2024
1 parent 44b3d2b commit c7b49c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/src/routes/pricing/flavor_price/modify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub async fn update_flavor_price_in_db(
data: &FlavorPriceModifyData,
) -> Result<FlavorPrice, NotFoundOrUnexpectedApiError> {
let row = select_flavor_price_from_db(transaction, data.id as u64).await?;
let user_class = data.user_class.clone().unwrap_or(row.user_class);
let user_class = data.user_class.unwrap_or(row.user_class);
let unit_price = data.unit_price.unwrap_or(row.unit_price);
let start_time = data.start_time.unwrap_or(row.start_time);
let flavor = data.flavor.unwrap_or(row.flavor);
Expand Down

0 comments on commit c7b49c7

Please sign in to comment.