Skip to content

Commit bf71769

Browse files
committed
Use Copy instead of Clone
1 parent 084dee0 commit bf71769

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

trino-lb-core/src/trino_cluster.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::{fmt::Display, time::SystemTime};
33
use serde::{Deserialize, Serialize};
44
use strum::IntoStaticStr;
55

6-
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Hash, Serialize, IntoStaticStr)]
6+
#[derive(Copy, Clone, Debug, Deserialize, Eq, PartialEq, Hash, Serialize, IntoStaticStr)]
77
pub enum ClusterState {
88
Unknown,
99
/// Not running at all

trino-lb/src/http_server/admin/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ async fn set_cluster_activation(
158158

159159
state
160160
.persistence
161-
.set_cluster_state(cluster_name, desired_state.clone())
161+
.set_cluster_state(cluster_name, desired_state)
162162
.await
163163
.context(SetClusterStateInPersistenceSnafu {
164164
cluster: cluster_name,

trino-lb/src/scaling/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ impl Scaler {
434434
let me = Arc::clone(&self);
435435
let target_state = target_states.get(&cluster.name).unwrap();
436436
join_set.spawn(
437-
me.apply_cluster_target_state(cluster, target_state.clone())
437+
me.apply_cluster_target_state(cluster, *target_state)
438438
.instrument(Span::current()),
439439
);
440440
}

0 commit comments

Comments
 (0)