Skip to content

Commit 84ee6aa

Browse files
committed
less qualifying more use
1 parent bab56d3 commit 84ee6aa

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

scylla/src/statement/batch.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use std::sync::Arc;
22

33
use crate::history::HistoryListener;
4+
use crate::load_balancing;
45
use crate::retry_policy::RetryPolicy;
56
use crate::statement::{prepared_statement::PreparedStatement, query::Query};
67
use crate::transport::{execution_profile::ExecutionProfileHandle, Node};
@@ -211,12 +212,10 @@ impl Batch {
211212
self.set_execution_profile_handle(Some(
212213
execution_profile_handle
213214
.pointee_to_builder()
214-
.load_balancing_policy(Arc::new(
215-
crate::load_balancing::EnforceTargetNodePolicy::new(
216-
node,
217-
execution_profile_handle.load_balancing_policy(),
218-
),
219-
))
215+
.load_balancing_policy(Arc::new(load_balancing::EnforceTargetNodePolicy::new(
216+
node,
217+
execution_profile_handle.load_balancing_policy(),
218+
)))
220219
.build()
221220
.into_handle(),
222221
))

scylla/src/transport/load_balancing/enforce_node.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
use super::{DefaultPolicy, FallbackPlan, LoadBalancingPolicy, NodeRef, RoutingInfo};
22
use crate::transport::{cluster::ClusterData, Node};
33
use std::sync::Arc;
4+
use uuid::Uuid;
45

56
/// This policy will always return the same node, unless it is not available anymore, in which case it will
67
/// fallback to the provided policy.
78
///
89
/// This is meant to be used for shard-aware batching.
910
#[derive(Debug)]
1011
pub struct EnforceTargetNodePolicy {
11-
target_node: uuid::Uuid,
12+
target_node: Uuid,
1213
fallback: Arc<dyn LoadBalancingPolicy>,
1314
}
1415

0 commit comments

Comments
 (0)