Skip to content

Commit 498384b

Browse files
committed
session: remove double indirection
A recent refactor introduced an unnecessary double indirection when passing `serialized_values` to `extract_partition_key_and_calculate_token`. It's curious that clippy didn't yell about this, but it was caught by a manual review.
1 parent 8986057 commit 498384b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scylla/src/client/session.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,11 +1401,13 @@ impl Session {
14011401
page_size: Option<PageSize>,
14021402
paging_state: PagingState,
14031403
) -> Result<(QueryResult, PagingStateResponse), ExecutionError> {
1404-
let values_ref = &serialized_values;
14051404
let paging_state_ref = &paging_state;
14061405

14071406
let (partition_key, token) = prepared
1408-
.extract_partition_key_and_calculate_token(prepared.get_partitioner_name(), values_ref)
1407+
.extract_partition_key_and_calculate_token(
1408+
prepared.get_partitioner_name(),
1409+
serialized_values,
1410+
)
14091411
.map_err(PartitionKeyError::into_execution_error)?
14101412
.unzip();
14111413

@@ -1463,7 +1465,7 @@ impl Session {
14631465
connection
14641466
.execute_raw_with_consistency(
14651467
prepared,
1466-
values_ref,
1468+
serialized_values,
14671469
consistency,
14681470
serial_consistency,
14691471
page_size,

0 commit comments

Comments
 (0)