Skip to content

Commit

Permalink
chore(evaluation): make clippy happy about clone (#268)
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Dmytrenko <[email protected]>
  • Loading branch information
erka authored May 15, 2024
1 parent 9e40f7a commit f358432
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions flipt-evaluation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,12 @@ pub fn variant_evaluation(
let d = &valid_distributions[index];

variant_evaluation_response.r#match = true;
variant_evaluation_response.variant_key = d.variant_key.clone();
variant_evaluation_response.variant_attachment = d.variant_attachment.clone();
variant_evaluation_response
.variant_key
.clone_from(&d.variant_key);
variant_evaluation_response
.variant_attachment
.clone_from(&d.variant_attachment);
variant_evaluation_response.reason = common::EvaluationReason::Match;
variant_evaluation_response.request_duration_millis = get_duration_millis(now)?;
return Ok(variant_evaluation_response);
Expand Down

0 comments on commit f358432

Please sign in to comment.