Skip to content

Commit

Permalink
Merge pull request #810 from piodul/bump-msrv-1.66
Browse files Browse the repository at this point in the history
MSRV: bump to 1.66.0
  • Loading branch information
piodul authored Sep 11, 2023
2 parents cabb6f1 + 8a9adce commit e9af9a1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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®].
Expand Down Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions scylla/src/transport/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions scylla/src/transport/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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()
Expand Down
8 changes: 0 additions & 8 deletions scylla/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T, U>(opt: Option<(T, U)>) -> (Option<T>, Option<U>) {
match opt {
Some((a, b)) => (Some(a), Some(b)),
None => (None, None),
}
}

0 comments on commit e9af9a1

Please sign in to comment.