diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 86d7254a53..47ef3dc88c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -10,7 +10,7 @@ env: CARGO_TERM_COLOR: always RUSTFLAGS: -Dwarnings RUST_BACKTRACE: full - rust_min: 1.65.0 # <- Update this when bumping up MSRV + rust_min: 1.66.0 # <- Update this when bumping up MSRV jobs: build: diff --git a/README.md b/README.md index c9682925bb..a6d2f27bf1 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ # ScyllaDB Rust Driver [![Crates.io](https://img.shields.io/crates/v/scylla.svg)](https://crates.io/crates/scylla) [![docs.rs](https://docs.rs/scylla/badge.svg)](https://docs.rs/scylla) -[![minimum rustc version](https://img.shields.io/badge/rustc-1.65-orange.svg)](https://crates.io/crates/scylla) +[![minimum rustc version](https://img.shields.io/badge/rustc-1.66-orange.svg)](https://crates.io/crates/scylla) This is a client-side driver for [ScyllaDB] written in pure Rust with a fully async API using [Tokio]. Although optimized for ScyllaDB, the driver is also compatible with [Apache Cassandra®]. @@ -65,7 +65,7 @@ Ongoing efforts: Please join the `#rust-driver` channel on [ScyllaDB Slack] to discuss any issues or questions you might have. ## Supported Rust Versions -Our driver's minimum supported Rust version (MSRV) is 1.65.0. Any changes will be explicitly published and will only happen during major releases. +Our driver's minimum supported Rust version (MSRV) is 1.66.0. Any changes will be explicitly published and will only happen during major releases. ## Reference Documentation diff --git a/scylla/src/transport/iterator.rs b/scylla/src/transport/iterator.rs index a9f5a7ec5b..e9389992ed 100644 --- a/scylla/src/transport/iterator.rs +++ b/scylla/src/transport/iterator.rs @@ -38,7 +38,6 @@ use crate::transport::load_balancing::{self, RoutingInfo}; use crate::transport::metrics::Metrics; use crate::transport::retry_policy::{QueryInfo, RetryDecision, RetrySession}; use crate::transport::{Node, NodeRef}; -use crate::utils::unzip_option; use tracing::{trace, trace_span, warn, Instrument}; use uuid::Uuid; @@ -246,7 +245,7 @@ impl RowIterator { prepared_ref.get_partitioner_name(), values_ref, ) { - Ok(res) => unzip_option(res), + Ok(res) => res.unzip(), Err(err) => { let (proof, _res) = ProvingSender::from(sender).send(Err(err)).await; return proof; diff --git a/scylla/src/transport/session.rs b/scylla/src/transport/session.rs index 790f840400..35ff25475f 100644 --- a/scylla/src/transport/session.rs +++ b/scylla/src/transport/session.rs @@ -7,7 +7,6 @@ use crate::cloud::CloudConfig; use crate::history; use crate::history::HistoryListener; use crate::utils::pretty::{CommaSeparatedDisplayer, CqlValueDisplayer}; -use crate::utils::unzip_option; use arc_swap::ArcSwapOption; use async_trait::async_trait; use bytes::Bytes; @@ -937,11 +936,12 @@ impl Session { let values_ref = &serialized_values; let paging_state_ref = &paging_state; - let (partition_key, token) = - unzip_option(prepared.extract_partition_key_and_calculate_token( + let (partition_key, token) = prepared + .extract_partition_key_and_calculate_token( prepared.get_partitioner_name(), &serialized_values, - )?); + )? + .unzip(); let execution_profile = prepared .get_execution_profile_handle() diff --git a/scylla/src/utils/mod.rs b/scylla/src/utils/mod.rs index 9399e33266..c83adbf7e7 100644 --- a/scylla/src/utils/mod.rs +++ b/scylla/src/utils/mod.rs @@ -2,11 +2,3 @@ pub(crate) mod parse; pub(crate) mod pretty; pub mod test_utils; - -// FIXME: replace this with `Option::unzip()` once MSRV is bumped to at least 1.66 -pub(crate) fn unzip_option(opt: Option<(T, U)>) -> (Option, Option) { - match opt { - Some((a, b)) => (Some(a), Some(b)), - None => (None, None), - } -}