Skip to content

Commit

Permalink
Make a clone more efficient
Browse files Browse the repository at this point in the history
  • Loading branch information
CaspianA1 committed Jun 5, 2024
1 parent 4ee2903 commit 7985cb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dashboard_defs/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub fn make_error_window(top_left: Vec2f, size: Vec2f, update_rate: UpdateRate,
// This means that the error changed (or disappeared)!
if curr_error != cached_error {
let skip_update = curr_error.is_none();
wrapped_individual_state.inner = curr_error.clone();
wrapped_individual_state.inner.clone_from(curr_error);
updater_params.window.set_draw_skipping(skip_update);
skip_update
}
Expand Down

0 comments on commit 7985cb8

Please sign in to comment.