From 9726a656370973092b78229a5ee721bd01e3dd86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Tue, 12 Aug 2025 17:49:20 +0200 Subject: [PATCH 01/19] scylla-cql: Remove time feature from Tokio Minor cleanup. This feature is not used by scylla-cql. --- scylla-cql/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scylla-cql/Cargo.toml b/scylla-cql/Cargo.toml index 8dde7c41a5..b05279ca07 100644 --- a/scylla-cql/Cargo.toml +++ b/scylla-cql/Cargo.toml @@ -22,7 +22,7 @@ all-features = true # used by macros. scylla-macros = { version = "=1.3.1", path = "../scylla-macros" } # AsyncRead trait used in read_response_frame -tokio = { version = "1.40", features = ["io-util", "time"] } +tokio = { version = "1.40", features = ["io-util"] } # FrameSlice and other parts of public API bytes = "1.0.1" # Tracing ids, CqlTimeuuid, ser/deser of CQL UUID From e829acf0fdd72bc3e5f38da02062fdb68e8c872e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Tue, 12 Aug 2025 18:29:38 +0200 Subject: [PATCH 02/19] scylla-cql: Fix mismatched_lifetime_syntaxes lint mismatched_lifetime_syntaxes is introduced in Rust 1.89. It warns when an elided lifetime (like &self) is bound to a hidden lifetime (like RawValue that is really RawValue<'_>). --- scylla-cql/src/deserialize/result.rs | 2 +- scylla-cql/src/serialize/row.rs | 4 ++-- scylla-proxy/src/frame.rs | 2 +- scylla/src/client/pager.rs | 4 ++-- scylla/src/cluster/metadata.rs | 2 +- scylla/src/response/coordinator.rs | 2 +- scylla/src/statement/prepared.rs | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scylla-cql/src/deserialize/result.rs b/scylla-cql/src/deserialize/result.rs index b747fcf4df..aad3117f78 100644 --- a/scylla-cql/src/deserialize/result.rs +++ b/scylla-cql/src/deserialize/result.rs @@ -181,7 +181,7 @@ impl RawRowLendingIterator { /// continue. #[inline] #[expect(clippy::should_implement_trait)] // https://github.com/rust-lang/rust-clippy/issues/5004 - pub fn next(&mut self) -> Option> { + pub fn next(&mut self) -> Option, DeserializationError>> { self.remaining = self.remaining.checked_sub(1)?; // First create the slice encompassing the whole frame. diff --git a/scylla-cql/src/serialize/row.rs b/scylla-cql/src/serialize/row.rs index 2ad87e4254..348a2dfa40 100644 --- a/scylla-cql/src/serialize/row.rs +++ b/scylla-cql/src/serialize/row.rs @@ -49,7 +49,7 @@ impl<'a> RowSerializationContext<'a> { /// Returns column/bind marker specifications for given query. #[inline] - pub fn columns(&self) -> &'a [ColumnSpec] { + pub fn columns(&self) -> &'a [ColumnSpec<'_>] { self.columns } } @@ -530,7 +530,7 @@ impl SerializedValues { /// Returns an iterator over the values serialized into the object so far. #[inline] - pub fn iter(&self) -> impl Iterator { + pub fn iter(&self) -> impl Iterator> { SerializedValuesIterator { serialized_values: &self.serialized_values, } diff --git a/scylla-proxy/src/frame.rs b/scylla-proxy/src/frame.rs index de42d2e33c..32eca9b13d 100644 --- a/scylla-proxy/src/frame.rs +++ b/scylla-proxy/src/frame.rs @@ -74,7 +74,7 @@ impl RequestFrame { .await } - pub fn deserialize(&self) -> Result { + pub fn deserialize(&self) -> Result, RequestDeserializationError> { Request::deserialize(&mut &self.body[..], self.opcode) } } diff --git a/scylla/src/client/pager.rs b/scylla/src/client/pager.rs index 514b8a2fe6..6fd5c9d7a5 100644 --- a/scylla/src/client/pager.rs +++ b/scylla/src/client/pager.rs @@ -621,7 +621,7 @@ impl QueryPager { /// borrows from self. /// /// This is cancel-safe. - async fn next(&mut self) -> Option> { + async fn next(&mut self) -> Option, NextRowError>> { let res = std::future::poll_fn(|cx| Pin::new(&mut *self).poll_fill_page(cx)).await; match res { Some(Ok(())) => {} @@ -1085,7 +1085,7 @@ impl TypedRowStream { /// Returns specification of row columns #[inline] - pub fn column_specs(&self) -> ColumnSpecs { + pub fn column_specs(&self) -> ColumnSpecs<'_, '_> { self.raw_row_lending_stream.column_specs() } } diff --git a/scylla/src/cluster/metadata.rs b/scylla/src/cluster/metadata.rs index 762d3f8a51..b99c90202a 100644 --- a/scylla/src/cluster/metadata.rs +++ b/scylla/src/cluster/metadata.rs @@ -1947,7 +1947,7 @@ fn parse_native_type(p: ParserState) -> ParseResult<(NativeType, ParserState)> { Ok((typ, p)) } -fn parse_user_defined_type(p: ParserState) -> ParseResult<(&str, ParserState)> { +fn parse_user_defined_type(p: ParserState<'_>) -> ParseResult<(&str, ParserState<'_>)> { // Java identifiers allow letters, underscores and dollar signs at any position // and digits in non-first position. Dots are accepted here because the names // are usually fully qualified. diff --git a/scylla/src/response/coordinator.rs b/scylla/src/response/coordinator.rs index 96247f6fdf..b18aafdba7 100644 --- a/scylla/src/response/coordinator.rs +++ b/scylla/src/response/coordinator.rs @@ -35,7 +35,7 @@ impl Coordinator { /// The node that served as coordinator of the request. #[inline] - pub fn node(&self) -> NodeRef { + pub fn node(&self) -> NodeRef<'_> { &self.node } diff --git a/scylla/src/statement/prepared.rs b/scylla/src/statement/prepared.rs index 34c51ad5fe..327751ac09 100644 --- a/scylla/src/statement/prepared.rs +++ b/scylla/src/statement/prepared.rs @@ -276,7 +276,7 @@ impl PreparedStatement { } /// Return keyspace name and table name this statement is operating on. - pub fn get_table_spec(&self) -> Option<&TableSpec> { + pub fn get_table_spec(&self) -> Option<&TableSpec<'_>> { self.get_prepared_metadata() .col_specs .first() From d3f4df9b373812ba40060f877a2e9f96a9d602e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Tue, 12 Aug 2025 19:33:55 +0200 Subject: [PATCH 03/19] ser/deser tests: Make sure structs are used In Rust 1.89, those structs started to trigger dead_code warning with information that they are never constructed. In row_tests / value_tests I don't want to allow/expect dead_code, because part of the reason for existence of those structs is to verify generated impls for those structs. The solution I chose is to write a never-called function that calles the relevant deserialize impl. This seems to work. Curiously, TestRowByName in hygiene tests doesn't trigger the warning. I am unable to tell why. I tried to replace derives with their generated impls, but I didn't notice any difference that could have caused this. --- scylla-cql/src/deserialize/row_tests.rs | 7 ++++++ scylla-cql/src/deserialize/value_tests.rs | 7 ++++++ scylla/tests/integration/macros/hygiene.rs | 26 ++++++++++++++++++++++ 3 files changed, 40 insertions(+) diff --git a/scylla-cql/src/deserialize/row_tests.rs b/scylla-cql/src/deserialize/row_tests.rs index 10267b9a34..820bfb6606 100644 --- a/scylla-cql/src/deserialize/row_tests.rs +++ b/scylla-cql/src/deserialize/row_tests.rs @@ -92,6 +92,13 @@ struct TestUdtWithNoFieldsUnordered {} #[scylla(crate = crate, flavor = "enforce_order")] struct TestUdtWithNoFieldsOrdered {} +// If deserialize is never called, rust warns that the struct is never constructed. +#[allow(unreachable_code, dead_code)] +fn dummy_deserialize_udts() { + let _ = deserialize::(todo!(), todo!()).unwrap(); + let _ = deserialize::(todo!(), todo!()).unwrap(); +} + #[test] fn test_struct_deserialization_loose_ordering() { #[derive(DeserializeRow, PartialEq, Eq, Debug)] diff --git a/scylla-cql/src/deserialize/value_tests.rs b/scylla-cql/src/deserialize/value_tests.rs index f8e54db0d5..a74cf32bd9 100644 --- a/scylla-cql/src/deserialize/value_tests.rs +++ b/scylla-cql/src/deserialize/value_tests.rs @@ -1242,6 +1242,13 @@ struct TestUdtWithNoFieldsUnordered {} #[scylla(crate = crate, flavor = "enforce_order")] struct TestUdtWithNoFieldsOrdered {} +// If deserialize is never called, rust warns that the struct is never constructed. +#[allow(unreachable_code, dead_code)] +fn dummy_deserialize_udts() { + let _ = deserialize::(todo!(), todo!()).unwrap(); + let _ = deserialize::(todo!(), todo!()).unwrap(); +} + #[test] fn test_udt_loose_ordering() { #[derive(scylla_macros::DeserializeValue, PartialEq, Eq, Debug)] diff --git a/scylla/tests/integration/macros/hygiene.rs b/scylla/tests/integration/macros/hygiene.rs index d8ed80f112..f51c67dc0d 100644 --- a/scylla/tests/integration/macros/hygiene.rs +++ b/scylla/tests/integration/macros/hygiene.rs @@ -334,6 +334,32 @@ macro_rules! test_crate { #[scylla(default_when_null)] d: ::core::primitive::i32, } + + // If deserialize is never called, rust warns that the struct is never constructed. + #[allow(unreachable_code, dead_code)] + fn dummy_deserialize() { + use _scylla::deserialize::value::DeserializeValue; + use _scylla::deserialize::row::DeserializeRow; + use ::std::todo; + #[allow(clippy::diverging_sub_expression)] + fn deserialize_value<'x, T: DeserializeValue<'x, 'x>>() { + let _ = >::deserialize(todo!(), todo!()); + } + #[allow(clippy::diverging_sub_expression)] + fn deserialize_row<'x, T: DeserializeRow<'x, 'x>>() { + let _ = >::deserialize(todo!()); + } + deserialize_value::(); + deserialize_value::(); + deserialize_value::(); + deserialize_value::(); + deserialize_value::(); + deserialize_value::(); + deserialize_value::(); + // For some reson, TestRowByName doesn't trigger the warning. + deserialize_row::(); + deserialize_row::(); + } }; } From d9c422148869280774cb6843b22258076561cbbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Tue, 12 Aug 2025 18:09:24 +0200 Subject: [PATCH 04/19] Cargo.toml: Allow needless_lifetimes lint Such lifetimes are often written intentionally, to make code easier to read. Lint will start to trigger when we bump MSRV to 1.85, so lets allow it. --- scylla-cql/Cargo.toml | 4 ++++ scylla/Cargo.toml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/scylla-cql/Cargo.toml b/scylla-cql/Cargo.toml index b05279ca07..f17b996bd2 100644 --- a/scylla-cql/Cargo.toml +++ b/scylla-cql/Cargo.toml @@ -93,3 +93,7 @@ full-serialization = [ [lints.rust] unnameable_types = "warn" unreachable_pub = "warn" + +[lints.clippy] +# Needless lifetimes are often written for documentation purposes. +needless_lifetimes = "allow" diff --git a/scylla/Cargo.toml b/scylla/Cargo.toml index 15bfb0b138..9fc285902f 100644 --- a/scylla/Cargo.toml +++ b/scylla/Cargo.toml @@ -147,3 +147,7 @@ unexpected_cfgs = { level = "warn", check-cfg = [ 'cfg(cpp_rust_unstable)', 'cfg(ccm_tests)', ] } + +[lints.clippy] +# Needless lifetimes are often written for documentation purposes. +needless_lifetimes = "allow" From 2b32fdcc6338fe280fb8f268b630d93f2cc60d0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Tue, 12 Aug 2025 18:11:33 +0200 Subject: [PATCH 05/19] scylla-cql/frame: Get rid of empty lines in doc comments There is a lint for that that starts to trigger after MSRV is bumped to 1.85. --- scylla-cql/src/frame/request/mod.rs | 2 +- scylla-cql/src/frame/response/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scylla-cql/src/frame/request/mod.rs b/scylla-cql/src/frame/request/mod.rs index 25e1b6d9ac..42fe5045bc 100644 --- a/scylla-cql/src/frame/request/mod.rs +++ b/scylla-cql/src/frame/request/mod.rs @@ -47,7 +47,7 @@ pub enum CqlRequestKind { Startup, /// Answers a server authentication challenge. - + /// /// Authentication in the protocol is SASL based. The server sends authentication /// challenges (a bytes token) to which the client answers with this message. Those /// exchanges continue until the server accepts the authentication by sending a diff --git a/scylla-cql/src/frame/response/mod.rs b/scylla-cql/src/frame/response/mod.rs index b2df37c5bd..ed3c6369dc 100644 --- a/scylla-cql/src/frame/response/mod.rs +++ b/scylla-cql/src/frame/response/mod.rs @@ -35,7 +35,7 @@ pub enum CqlResponseKind { /// Indicates that the server requires authentication, and which authentication /// mechanism to use. - + /// /// The authentication is SASL based and thus consists of a number of server /// challenges (AUTH_CHALLENGE) followed by client responses (AUTH_RESPONSE). /// The initial exchange is however bootstrapped by an initial client response. From 978976d3b1c694f30efa38eeea6eb82e298b01d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Tue, 12 Aug 2025 18:12:58 +0200 Subject: [PATCH 06/19] SE: Use match for comparisons There is a lint for that that starts to trigger when MSRV is bumped to 1.85. --- scylla/src/policies/speculative_execution.rs | 32 +++++++++++--------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/scylla/src/policies/speculative_execution.rs b/scylla/src/policies/speculative_execution.rs index e4c70b2f53..d6d6dbf17d 100644 --- a/scylla/src/policies/speculative_execution.rs +++ b/scylla/src/policies/speculative_execution.rs @@ -248,13 +248,15 @@ mod tests { let future = { let fiber_idx = counter; async move { - if fiber_idx < 4 { - tokio::time::sleep(Duration::from_secs(5)).await; - IGNORABLE_ERROR.clone() - } else if fiber_idx == 4 { - None - } else { - panic!("Too many speculative executions - expected 4"); + match fiber_idx.cmp(&4) { + std::cmp::Ordering::Less => { + tokio::time::sleep(Duration::from_secs(5)).await; + IGNORABLE_ERROR.clone() + } + std::cmp::Ordering::Equal => None, + std::cmp::Ordering::Greater => { + panic!("Too many speculative executions - expected 4") + } } } }; @@ -297,13 +299,15 @@ mod tests { let future = { let fiber_idx = counter; async move { - if fiber_idx < 4 { - tokio::time::sleep(Duration::from_secs(5)).await; - IGNORABLE_ERROR.clone() - } else if fiber_idx == 4 { - None - } else { - panic!("Too many speculative executions - expected 4"); + match fiber_idx.cmp(&4) { + std::cmp::Ordering::Less => { + tokio::time::sleep(Duration::from_secs(5)).await; + IGNORABLE_ERROR.clone() + } + std::cmp::Ordering::Equal => None, + std::cmp::Ordering::Greater => { + panic!("Too many speculative executions - expected 4") + } } } }; From 5dc0f4f9525cf4eb8a02e76e86359137dfc64ae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Tue, 12 Aug 2025 18:13:54 +0200 Subject: [PATCH 07/19] Bump MSRV to 1.85 This time I bumped all the crates. Why? Because I want us to move to edition 2024. --- .github/workflows/rust.yml | 2 +- Cargo.lock.msrv | 1113 +++++++++++++++++++++++------------- README.md | 2 +- scylla-cql/Cargo.toml | 2 +- scylla-macros/Cargo.toml | 2 +- scylla-proxy/Cargo.toml | 2 +- scylla/Cargo.toml | 2 +- 7 files changed, 733 insertions(+), 392 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index adc88a0650..959e301886 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -13,7 +13,7 @@ env: CARGO_TERM_COLOR: always RUSTFLAGS: -Dwarnings RUST_BACKTRACE: full - rust_min: 1.82.0 # <- Update this when bumping up MSRV + rust_min: 1.85.0 # <- Update this when bumping up MSRV jobs: static_checks: diff --git a/Cargo.lock.msrv b/Cargo.lock.msrv index e20b01a5c6..6557b26efa 100644 --- a/Cargo.lock.msrv +++ b/Cargo.lock.msrv @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 4 +version = 3 [[package]] name = "addr2line" @@ -13,9 +13,9 @@ dependencies = [ [[package]] name = "adler2" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aho-corasick" @@ -55,9 +55,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.19" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933" +checksum = "3ae563653d1938f79b1ab1b5e668c87c76a9930414574a6583a7b7e11a8e6192" dependencies = [ "anstyle", "anstyle-parse", @@ -70,9 +70,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" +checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" [[package]] name = "anstyle-parse" @@ -85,29 +85,29 @@ dependencies = [ [[package]] name = "anstyle-query" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8bdeb6047d8983be085bab0ba1472e6dc604e7041dbf6fcd5e71523014fae9" +checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "anstyle-wincon" -version = "3.0.9" +version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403f75924867bb1033c59fbf0797484329750cfbe3c4325cd33127941fabc882" +checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "anyhow" -version = "1.0.98" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" +checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" [[package]] name = "arc-swap" @@ -123,32 +123,35 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.104", ] [[package]] name = "atomic" -version = "0.5.3" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" +checksum = "a89cbf775b137e9b968e67227ef7f775587cde3fd31b0d8599dbd0f598a48340" +dependencies = [ + "bytemuck", +] [[package]] name = "autocfg" -version = "1.3.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "aws-lc-rs" -version = "1.12.6" +version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dabb68eb3a7aa08b46fddfd59a3d55c978243557a90ab804769f7e20e67d2b01" +checksum = "5c953fe1ba023e6b7730c0d4b031d06f267f23a46167dcbd40316644b10a17ba" dependencies = [ "aws-lc-sys", "zeroize", @@ -156,9 +159,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.27.2" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02864f6f8061f14ca73c85d261838dcb87b6a9a4259781bd0e1031821b280167" +checksum = "dbfd150b5dbdb988bcc8fb1fe787eb6b7ee6180ca24da683b61ea5405f3d43ff" dependencies = [ "bindgen", "cc", @@ -169,9 +172,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.74" +version = "0.3.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" dependencies = [ "addr2line", "cfg-if", @@ -179,7 +182,7 @@ dependencies = [ "miniz_oxide", "object", "rustc-demangle", - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -190,9 +193,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bigdecimal" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f31f3af01c5c65a07985c804d3366560e6fa7883d640a122819b14ec327482c" +checksum = "1a22f228ab7a1b23027ccc6c350b72868017af7ea8356fbdf19f8d991c690013" dependencies = [ "autocfg", "libm", @@ -210,7 +213,7 @@ dependencies = [ "bitflags", "cexpr", "clang-sys", - "itertools 0.10.5", + "itertools 0.12.1", "lazy_static", "lazycell", "log", @@ -220,7 +223,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.90", + "syn 2.0.104", "which", ] @@ -232,9 +235,15 @@ checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" + +[[package]] +name = "bytemuck" +version = "1.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3995eaeebcdf32f91f980d360f78732ddc061097ab4e39991ae7a6ace9194677" [[package]] name = "byteorder" @@ -244,9 +253,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "cast" @@ -256,9 +265,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.15" +version = "1.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c736e259eea577f443d5c86c304f9f4ae0295c43f3ba05c21f1d66b5f06001af" +checksum = "2352e5597e9c544d5e6d9c95190d5d27738ade584fa8db0a16e130e5c2b5296e" dependencies = [ "jobserver", "libc", @@ -276,9 +285,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" [[package]] name = "cfg_aliases" @@ -288,14 +297,14 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", - "windows-targets", + "windows-link", ] [[package]] @@ -338,9 +347,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.37" +version = "4.5.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eccb054f56cbd38340b380d4a8e69ef1f02f1af43db2f0cc817a4774d80ae071" +checksum = "1c1f056bae57e3e54c3375c41ff79619ddd13460a17d7438712bd0d83fda4ff8" dependencies = [ "clap_builder", "clap_derive", @@ -348,9 +357,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.37" +version = "4.5.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd9466fac8543255d3b1fcad4762c5e116ffe808c8a3043d4263cd4fd4862a2" +checksum = "b3e7f4214277f3c7aa526a59dd3fbe306a370daee1f8b7b8c987069cd8e888a8" dependencies = [ "anstream", "anstyle", @@ -360,27 +369,27 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.32" +version = "4.5.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" +checksum = "ef4f52386a59ca4c860f7393bcf8abd8dfd91ecccc0f774635ff68e92eeef491" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.104", ] [[package]] name = "clap_lex" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" +checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" [[package]] name = "clipboard-win" -version = "5.4.0" +version = "5.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15efe7a882b08f34e38556b14f2fb3daa98769d06c7f0c1b076dfd0d983bc892" +checksum = "bde03770d3df201d4fb868f2c9c59e66a3e4e2bd06692a0fe701e7103c7e84d4" dependencies = [ "error-code", ] @@ -441,9 +450,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -460,21 +469,21 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crunchy" -version = "0.2.2" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "darling" -version = "0.20.10" +version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" dependencies = [ "darling_core", "darling_macro", @@ -482,27 +491,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.10" +version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.90", + "syn 2.0.104", ] [[package]] name = "darling_macro" -version = "0.20.10" +version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core", "quote", - "syn 2.0.90", + "syn 2.0.104", ] [[package]] @@ -528,6 +537,17 @@ dependencies = [ "powerfmt", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + [[package]] name = "dunce" version = "1.0.5" @@ -536,9 +556,9 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "either" -version = "1.13.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "endian-type" @@ -558,31 +578,31 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.6" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcaee3d8e3cfc3fd92428d477bc97fc29ec8716d180c0d74c643bb26166660e0" +checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" dependencies = [ "anstream", "anstyle", "env_filter", - "humantime", + "jiff", "log", ] [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.10" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -628,7 +648,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78" dependencies = [ "cfg-if", - "rustix 1.0.3", + "rustix 1.0.8", "windows-sys 0.59.0", ] @@ -676,9 +696,9 @@ checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -691,9 +711,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -701,15 +721,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -718,38 +738,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.104", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -765,20 +785,20 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", ] [[package]] name = "getrandom" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ "cfg-if", "libc", @@ -794,15 +814,15 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "half" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" +checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9" dependencies = [ "cfg-if", "crunchy", @@ -816,9 +836,9 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "hashbrown" -version = "0.15.4" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ "allocator-api2", "equivalent", @@ -837,7 +857,7 @@ version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95aebe0dec9a429e3207e5e34d97f2a7d1064d5ee6d8ed13ce0a26456de000ae" dependencies = [ - "thiserror 1.0.60", + "thiserror 1.0.69", ] [[package]] @@ -849,22 +869,17 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "humantime" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b112acc8b3adf4b107a8ec20977da0273a8c386765a3ec0229bd500a1443f9f" - [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", + "log", "wasm-bindgen", "windows-core", ] @@ -878,6 +893,92 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" + +[[package]] +name = "icu_properties" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "potential_utf", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" + +[[package]] +name = "icu_provider" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +dependencies = [ + "displaydoc", + "icu_locale_core", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -886,22 +987,44 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] name = "indexmap" -version = "2.2.6" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.5", +] + +[[package]] +name = "io-uring" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" +dependencies = [ + "bitflags", + "cfg-if", + "libc", ] [[package]] @@ -919,6 +1042,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.13.0" @@ -939,16 +1071,41 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "jiff" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "be1f93b8b1eb69c77f24bbb0afdf66f54b632ee39af40ca21c4365a1d7347e49" +dependencies = [ + "jiff-static", + "log", + "portable-atomic", + "portable-atomic-util", + "serde", +] + +[[package]] +name = "jiff-static" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03343451ff899767262ec32146f6d559dd759fdadf42ff0e227c7c48f72594b4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] [[package]] name = "jobserver" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" dependencies = [ + "getrandom 0.3.3", "libc", ] @@ -964,9 +1121,9 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lazycell" @@ -976,25 +1133,25 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.174" +version = "0.2.175" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" [[package]] name = "libloading" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", - "windows-targets", + "windows-targets 0.53.3", ] [[package]] name = "libm" -version = "0.2.11" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" [[package]] name = "linux-raw-sys" @@ -1004,15 +1161,21 @@ checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "linux-raw-sys" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" + +[[package]] +name = "litemap" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" [[package]] name = "lock_api" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" dependencies = [ "autocfg", "scopeguard", @@ -1026,9 +1189,9 @@ checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "lz4_flex" -version = "0.11.3" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75761162ae2b0e580d7e7c390558127e5f01b4194debd6221fd8c207fc80e3f5" +checksum = "08ab2867e3eeeca90e844d1940eab391c9dc5228783db2ed999acbc0a9ed375a" dependencies = [ "twox-hash", ] @@ -1044,9 +1207,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "minimal-lexical" @@ -1056,22 +1219,22 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.5" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", ] [[package]] name = "mio" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.52.0", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.59.0", ] [[package]] @@ -1204,9 +1367,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "once_cell_polyfill" @@ -1216,15 +1379,15 @@ checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" [[package]] name = "oorandom" -version = "11.1.3" +version = "11.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" [[package]] name = "openssl" -version = "0.10.71" +version = "0.10.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" +checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" dependencies = [ "bitflags", "cfg-if", @@ -1243,14 +1406,14 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.104", ] [[package]] name = "openssl-sys" -version = "0.9.106" +version = "0.9.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" +checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" dependencies = [ "cc", "libc", @@ -1266,9 +1429,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" dependencies = [ "lock_api", "parking_lot_core", @@ -1276,15 +1439,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.10" +version = "0.9.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -1295,9 +1458,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -1307,15 +1470,15 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "plotters" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" dependencies = [ "num-traits", "plotters-backend", @@ -1326,19 +1489,43 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" [[package]] name = "plotters-svg" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" dependencies = [ "plotters-backend", ] +[[package]] +name = "portable-atomic" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" + +[[package]] +name = "portable-atomic-util" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "potential_utf" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +dependencies = [ + "zerovec", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -1347,52 +1534,55 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] [[package]] name = "prettyplease" -version = "0.2.25" +version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +checksum = "ff24dfcda44452b9816fff4cd4227e1bb73ff5a2f1bc1105aa92fb8565ce44d2" dependencies = [ "proc-macro2", - "syn 2.0.90", + "syn 2.0.104", ] [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" dependencies = [ "toml_edit", ] [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "d61789d7719defeb74ea5fe81f2fdfdbd28a803847077cecce2ff14e1472f6f1" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.36" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] [[package]] name = "r-efi" -version = "5.2.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "radix_trie" @@ -1406,13 +1596,12 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.0" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha", "rand_core", - "zerocopy", ] [[package]] @@ -1431,7 +1620,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom 0.3.2", + "getrandom 0.3.3", ] [[package]] @@ -1465,23 +1654,23 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.7" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ "bitflags", ] [[package]] name = "regex" -version = "1.10.4" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.3", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", ] [[package]] @@ -1495,13 +1684,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.3", + "regex-syntax 0.8.5", ] [[package]] @@ -1512,9 +1701,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "ring" @@ -1524,7 +1713,7 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.15", + "getrandom 0.2.16", "libc", "untrusted", "windows-sys 0.52.0", @@ -1532,9 +1721,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc-hash" @@ -1557,22 +1746,22 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.3" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e56a18552996ac8d29ecc3b190b4fdbb2d91ca4ec396de7bbffaf43f3d637e96" +checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ "bitflags", "errno", "libc", - "linux-raw-sys 0.9.3", - "windows-sys 0.59.0", + "linux-raw-sys 0.9.4", + "windows-sys 0.60.2", ] [[package]] name = "rustls" -version = "0.23.25" +version = "0.23.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "822ee9188ac4ec04a2f0531e55d035fb2de73f18b41a63c70c2712503b6fb13c" +checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc" dependencies = [ "aws-lc-rs", "log", @@ -1585,15 +1774,18 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" +checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" +dependencies = [ + "zeroize", +] [[package]] name = "rustls-webpki" -version = "0.103.0" +version = "0.103.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aa4eeac2588ffff23e9d7a7e9b3f971c5fb5b7ebc9452745e0c232c64f83b2f" +checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc" dependencies = [ "aws-lc-rs", "ring", @@ -1603,9 +1795,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "rustyline" @@ -1637,14 +1829,14 @@ checksum = "5d66de233f908aebf9cc30ac75ef9103185b4b715c6f2fb7a626aa5e5ede53ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.104", ] [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "same-file" @@ -1676,7 +1868,7 @@ dependencies = [ "criterion", "dashmap", "futures", - "hashbrown 0.15.4", + "hashbrown 0.15.5", "histogram", "itertools 0.14.0", "ntest", @@ -1692,9 +1884,9 @@ dependencies = [ "serde", "serde_yaml", "smallvec", - "socket2", + "socket2 0.5.10", "tempfile", - "thiserror 2.0.12", + "thiserror 2.0.14", "time", "tokio", "tokio-openssl", @@ -1724,7 +1916,7 @@ dependencies = [ "serde", "snap", "stable_deref_trait", - "thiserror 2.0.12", + "thiserror 2.0.14", "time", "tokio", "uuid", @@ -1740,7 +1932,7 @@ dependencies = [ "quote", "scylla", "scylla-cql", - "syn 2.0.90", + "syn 2.0.104", ] [[package]] @@ -1757,7 +1949,7 @@ dependencies = [ "num-bigint 0.3.3", "rand", "scylla-cql", - "thiserror 2.0.12", + "thiserror 2.0.14", "tokio", "tracing", "tracing-subscriber", @@ -1775,31 +1967,32 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.201" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.201" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.104", ] [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -1834,27 +2027,24 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.2" +version = "1.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" dependencies = [ "libc", ] [[package]] name = "slab" -version = "0.4.9" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "smallvec" -version = "1.13.2" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "snap" @@ -1864,25 +2054,29 @@ checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" dependencies = [ "libc", "windows-sys 0.52.0", ] [[package]] -name = "stable_deref_trait" -version = "1.2.0" +name = "socket2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] [[package]] -name = "static_assertions" -version = "1.1.0" +name = "stable_deref_trait" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "stats_alloc" @@ -1915,9 +2109,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.90" +version = "2.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" dependencies = [ "proc-macro2", "quote", @@ -1926,83 +2120,82 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.104", ] [[package]] name = "tempfile" -version = "3.19.1" +version = "3.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" +checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" dependencies = [ "fastrand", - "getrandom 0.3.2", + "getrandom 0.3.3", "once_cell", - "rustix 1.0.3", + "rustix 1.0.8", "windows-sys 0.59.0", ] [[package]] name = "thiserror" -version = "1.0.60" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl 1.0.60", + "thiserror-impl 1.0.69", ] [[package]] name = "thiserror" -version = "2.0.12" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "0b0949c3a6c842cbde3f1686d6eea5a010516deb7085f79db747562d4102f41e" dependencies = [ - "thiserror-impl 2.0.12", + "thiserror-impl 2.0.14", ] [[package]] name = "thiserror-impl" -version = "1.0.60" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.104", ] [[package]] name = "thiserror-impl" -version = "2.0.12" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "cc5b44b4ab9c2fdd0e0512e6bece8388e214c0749f5862b114cc5b7a25daf227" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.104", ] [[package]] name = "thread_local" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" dependencies = [ "cfg-if", - "once_cell", ] [[package]] name = "time" -version = "0.3.40" +version = "0.3.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d9c75b47bdff86fa3334a3db91356b8d7d86a9b839dab7d0bdc5c3d3a077618" +checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" dependencies = [ "deranged", "num-conv", @@ -2020,55 +2213,52 @@ checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" [[package]] name = "time-macros" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29aa485584182073ed57fd5004aa09c371f021325014694e432313345865fd04" +checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" dependencies = [ "num-conv", "time-core", ] [[package]] -name = "tinytemplate" -version = "1.2.1" +name = "tinystr" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" dependencies = [ - "serde", - "serde_json", + "displaydoc", + "zerovec", ] [[package]] -name = "tinyvec" -version = "1.6.0" +name = "tinytemplate" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" dependencies = [ - "tinyvec_macros", + "serde", + "serde_json", ] -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" -version = "1.45.0" +version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2513ca694ef9ede0fb23fe71a4ee4107cb102b9dc1930f6d0fd77aae068ae165" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ "backtrace", "bytes", + "io-uring", "libc", "mio", "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "slab", + "socket2 0.6.0", "tokio-macros", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2079,16 +2269,15 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.104", ] [[package]] name = "tokio-openssl" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ffab79df67727f6acf57f1ff743091873c24c579b1e2ce4d8f53e47ded4d63d" +checksum = "59df6849caa43bb7567f9a36f863c447d95a11d5903c9cc334ba32576a27eadd" dependencies = [ - "futures-util", "openssl", "openssl-sys", "tokio", @@ -2106,15 +2295,15 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" [[package]] name = "toml_edit" -version = "0.21.1" +version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ "indexmap", "toml_datetime", @@ -2145,9 +2334,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "log", "pin-project-lite", @@ -2157,20 +2346,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.104", ] [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" dependencies = [ "once_cell", "valuable", @@ -2189,9 +2378,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "matchers", "nu-ansi-term", @@ -2207,40 +2396,21 @@ dependencies = [ [[package]] name = "twox-hash" -version = "1.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" -dependencies = [ - "cfg-if", - "static_assertions", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.15" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "8b907da542cbced5261bd3256de1b3a1bf340a3d37f93425a07362a1d687de56" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" @@ -2262,20 +2432,26 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "utils" @@ -2288,19 +2464,21 @@ dependencies = [ [[package]] name = "uuid" -version = "1.8.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +checksum = "f33196643e165781c20a5ead5582283a7dacbb87855d867fbc2df3f81eddc1be" dependencies = [ "atomic", - "getrandom 0.2.15", + "getrandom 0.3.3", + "js-sys", + "wasm-bindgen", ] [[package]] name = "valuable" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "vcpkg" @@ -2320,9 +2498,9 @@ dependencies = [ [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" @@ -2355,7 +2533,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.104", "wasm-bindgen-shared", ] @@ -2377,7 +2555,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.104", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2393,9 +2571,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", @@ -2431,11 +2609,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -2446,11 +2624,61 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.52.0" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ - "windows-targets", + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "windows-interface" +version = "0.59.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link", ] [[package]] @@ -2459,7 +2687,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -2468,7 +2696,16 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.3", ] [[package]] @@ -2477,14 +2714,31 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", ] [[package]] @@ -2493,53 +2747,101 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + [[package]] name = "winnow" -version = "0.5.40" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" dependencies = [ "memchr", ] @@ -2553,6 +2855,12 @@ dependencies = [ "bitflags", ] +[[package]] +name = "writeable" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" + [[package]] name = "yoke" version = "0.8.0" @@ -2573,35 +2881,35 @@ checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.104", "synstructure", ] [[package]] name = "zerocopy" -version = "0.8.24" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879" +checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.24" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be" +checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.104", ] [[package]] name = "zerofrom" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" dependencies = [ "zerofrom-derive", ] @@ -2614,12 +2922,45 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.104", "synstructure", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zerotrie" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] diff --git a/README.md b/README.md index fcb0a5e02d..508d00945a 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ features will only be developed for the latest major version. ## Supported Rust Versions -Our driver's minimum supported Rust version (MSRV) is 1.82.0. +Our driver's minimum supported Rust version (MSRV) is 1.85.0. Changes to MSRV can only happen in major and minor relases, but not in patch releases. We will not bump MSRV to a Rust version that was released less than 6 months ago. diff --git a/scylla-cql/Cargo.toml b/scylla-cql/Cargo.toml index f17b996bd2..605f549f5c 100644 --- a/scylla-cql/Cargo.toml +++ b/scylla-cql/Cargo.toml @@ -2,7 +2,7 @@ name = "scylla-cql" version = "1.3.1" edition = "2021" -rust-version = "1.70" +rust-version = "1.85" description = "CQL data types and primitives, for interacting with ScyllaDB." repository = "https://github.com/scylladb/scylla-rust-driver" readme = "../README.md" diff --git a/scylla-macros/Cargo.toml b/scylla-macros/Cargo.toml index 9b2061d12b..e6fc600832 100644 --- a/scylla-macros/Cargo.toml +++ b/scylla-macros/Cargo.toml @@ -2,7 +2,7 @@ name = "scylla-macros" version = "1.3.1" edition = "2021" -rust-version = "1.81" +rust-version = "1.85" description = "proc macros for the ScyllaDB async CQL driver" repository = "https://github.com/scylladb/scylla-rust-driver" readme = "../README.md" diff --git a/scylla-proxy/Cargo.toml b/scylla-proxy/Cargo.toml index 731acb5735..159cc293df 100644 --- a/scylla-proxy/Cargo.toml +++ b/scylla-proxy/Cargo.toml @@ -2,7 +2,7 @@ name = "scylla-proxy" version = "0.0.4" edition = "2021" -rust-version = "1.81" +rust-version = "1.85" description = "Proxy layer between Scylla driver and cluster that enables testing Scylla drivers' behaviour in unfavourable conditions" repository = "https://github.com/scylladb/scylla-rust-driver" readme = "../README.md" diff --git a/scylla/Cargo.toml b/scylla/Cargo.toml index 9fc285902f..ea10a911e7 100644 --- a/scylla/Cargo.toml +++ b/scylla/Cargo.toml @@ -2,7 +2,7 @@ name = "scylla" version = "1.3.1" edition = "2021" -rust-version = "1.82" +rust-version = "1.85" description = "Async CQL driver for Rust, optimized for Scylla, fully compatible with Apache Cassandraâ„¢" repository = "https://github.com/scylladb/scylla-rust-driver" readme = "../README.md" From 982758428272eb7760bbddbec7986ed30a756fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Tue, 12 Aug 2025 18:26:03 +0200 Subject: [PATCH 08/19] Rename "gen" variables "gen" became a reserved keyword in edition 2024. We want to move to that edition, so I renamed all of those to "generator". Fortunately, none of them appear in the public API. --- scylla-macros/src/serialize/row.rs | 6 +++--- scylla-macros/src/serialize/value.rs | 4 ++-- scylla/src/network/connection.rs | 6 +++--- scylla/src/policies/load_balancing/default.rs | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/scylla-macros/src/serialize/row.rs b/scylla-macros/src/serialize/row.rs index e871dcb6ee..3a673bac5e 100644 --- a/scylla-macros/src/serialize/row.rs +++ b/scylla-macros/src/serialize/row.rs @@ -111,13 +111,13 @@ pub(crate) fn derive_serialize_row(tokens_input: TokenStream) -> Result = match ctx.attributes.flavor { + let generator: Box = match ctx.attributes.flavor { Flavor::MatchByName => Box::new(ColumnSortingGenerator { ctx: &ctx }), Flavor::EnforceOrder => Box::new(ColumnOrderedGenerator { ctx: &ctx }), }; - let serialize_item = gen.generate_serialize(); - let is_empty_item = gen.generate_is_empty(); + let serialize_item = generator.generate_serialize(); + let is_empty_item = generator.generate_is_empty(); let res = parse_quote! { #[automatically_derived] diff --git a/scylla-macros/src/serialize/value.rs b/scylla-macros/src/serialize/value.rs index 3d16e79bd6..fc24ffd7f2 100644 --- a/scylla-macros/src/serialize/value.rs +++ b/scylla-macros/src/serialize/value.rs @@ -120,12 +120,12 @@ pub(crate) fn derive_serialize_value( let ctx = Context { attributes, fields }; ctx.validate(&input.ident)?; - let gen: Box = match ctx.attributes.flavor { + let generator: Box = match ctx.attributes.flavor { Flavor::MatchByName => Box::new(FieldSortingGenerator { ctx: &ctx }), Flavor::EnforceOrder => Box::new(FieldOrderedGenerator { ctx: &ctx }), }; - let serialize_item = gen.generate_serialize(); + let serialize_item = generator.generate_serialize(); let res = parse_quote! { #[automatically_derived] diff --git a/scylla/src/network/connection.rs b/scylla/src/network/connection.rs index 5b9a76a1b8..55a2eb4061 100644 --- a/scylla/src/network/connection.rs +++ b/scylla/src/network/connection.rs @@ -855,7 +855,7 @@ impl Connection { self.config .timestamp_generator .as_ref() - .map(|gen| gen.next_timestamp()) + .map(|generator| generator.next_timestamp()) }; let timestamp = statement.get_timestamp().or_else(get_timestamp_from_gen); @@ -912,7 +912,7 @@ impl Connection { self.config .timestamp_generator .as_ref() - .map(|gen| gen.next_timestamp()) + .map(|generator| generator.next_timestamp()) }; let timestamp = prepared_statement .get_timestamp() @@ -1047,7 +1047,7 @@ impl Connection { self.config .timestamp_generator .as_ref() - .map(|gen| gen.next_timestamp()) + .map(|generator| generator.next_timestamp()) }; let timestamp = batch.get_timestamp().or_else(get_timestamp_from_gen); diff --git a/scylla/src/policies/load_balancing/default.rs b/scylla/src/policies/load_balancing/default.rs index ea9a275a82..0f390d1e3b 100644 --- a/scylla/src/policies/load_balancing/default.rs +++ b/scylla/src/policies/load_balancing/default.rs @@ -808,8 +808,8 @@ impl DefaultPolicy { let replica_set = self.nonfiltered_replica_set(ts, replica_location, cluster, table_spec); if let Some(fixed) = self.fixed_seed { - let mut gen = Pcg32::new(fixed, 0); - replica_set.choose_filtered(&mut gen, |(node, shard)| predicate(node, *shard)) + let mut generator = Pcg32::new(fixed, 0); + replica_set.choose_filtered(&mut generator, |(node, shard)| predicate(node, *shard)) } else { replica_set.choose_filtered(&mut rng(), |(node, shard)| predicate(node, *shard)) } @@ -889,8 +889,8 @@ impl DefaultPolicy { let mut vec: Vec<(NodeRef<'_>, Shard)> = iter.collect(); if let Some(fixed) = self.fixed_seed { - let mut gen = Pcg32::new(fixed, 0); - vec.shuffle(&mut gen); + let mut generator = Pcg32::new(fixed, 0); + vec.shuffle(&mut generator); } else { vec.shuffle(&mut rng()); } From 3efc7594d7370a0bd84a3aaa503fca74732593a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Tue, 12 Aug 2025 18:32:40 +0200 Subject: [PATCH 09/19] Remove unnecessary "ref" Those became errors in 2024. --- scylla-cql/src/deserialize/row_tests.rs | 2 +- scylla-proxy/src/proxy.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scylla-cql/src/deserialize/row_tests.rs b/scylla-cql/src/deserialize/row_tests.rs index 820bfb6606..7e3e0cd1f2 100644 --- a/scylla-cql/src/deserialize/row_tests.rs +++ b/scylla-cql/src/deserialize/row_tests.rs @@ -393,7 +393,7 @@ fn test_tuple_errors() { assert_eq!(err.cql_type, ColumnType::Native(NativeType::Int)); assert_matches!( &err.kind, - super::super::value::BuiltinTypeCheckErrorKind::MismatchedType { + &super::super::value::BuiltinTypeCheckErrorKind::MismatchedType { expected: &[ColumnType::Native(NativeType::BigInt)] } ); diff --git a/scylla-proxy/src/proxy.rs b/scylla-proxy/src/proxy.rs index 67e6123564..9cbd8f2216 100644 --- a/scylla-proxy/src/proxy.rs +++ b/scylla-proxy/src/proxy.rs @@ -1319,7 +1319,7 @@ impl ProxyWorker { connection_close_signaler.clone(); let drop_action = async move { if let Some(ref delay) = drop_connection_action { - if let Some(ref time) = delay { + if let Some(time) = delay { tokio::time::sleep(*time).await; } // close connection. @@ -1425,7 +1425,7 @@ impl ProxyWorker { connection_close_signaler.clone(); let drop_action = async move { if let Some(ref delay) = drop_connection_action { - if let Some(ref time) = delay { + if let Some(time) = delay { tokio::time::sleep(*time).await; } // close connection. From 3bb7d0df88b2a5d75823fa9375f22409909a0027 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Tue, 12 Aug 2025 21:12:55 +0200 Subject: [PATCH 10/19] Preparing for 2024 edition: automatic changes How this commit was created: I executed `cargo fix --edition`. After that I looked through the changes, and reverted the ones I thought were unnecessary. What changes I reverted? - Rust 2024 added new expression types matched by `expr` fragment specifier. For backwards compatibility `expr_2021` exists as well. cargo moves the code to use it, but for our macros `expr` is still fine - they are only internal after all. - In Rust 2024, lifetime of temporary expression in `if let Pattern = Expression` changed. Now it is dropped before entering `else` branch. Cargo switches the code to use `match` instead of `if let` for compatibility. I reviewed affected places in our code and concluded that we can keep using `if let` everywhere. That means that the only commited changes are related to RPIT lifetime capture rules. Cargo introduced `use` bounds in several places. Most of them are not important since they are not pub so we can change them later. Two places were pub, and cargo correctly preserved current semantics (which are also reasonable imo). The pub places: - `ColumnSpecs::iter`: `use<'slice, 'spec>` was introduced. We don't need or want to bind to lifetime of a self reference, only to lifetimes of held slice, so it makes sense. - `Sharder::iter_source_ports_for_shard`. `use<>` was introduced by Cargo. This is correct - the returned iterator does not depend on self. self is only needed to get the bounds of the port range. There is one thing that automatic migration doesn't handle the "outlives trick": https://doc.rust-lang.org/edition-guide/rust-2024/rpit-lifetime-capture.html#migrating-away-from-the-outlives-trick I don't understand it completely unfortunately. We should understand it, and if needed migrate from it, before migrating to 2024 edition. We have a method like this for example: ``` pub(crate) fn iter_working_connections_per_node( &self, ) -> Result< impl Iterator> + use<>)> + '_, ConnectionPoolError, > ``` Is it an example of this trick? Should we change this `+ '_` to `use<'_>`? --- scylla/src/cluster/state.rs | 4 ++-- scylla/src/observability/metrics.rs | 2 +- scylla/src/policies/load_balancing/default.rs | 2 +- scylla/src/response/query_result.rs | 2 +- scylla/src/routing/locator/replication_info.rs | 2 +- scylla/src/routing/locator/test.rs | 2 +- scylla/src/routing/sharding.rs | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scylla/src/cluster/state.rs b/scylla/src/cluster/state.rs index f346d131a2..ab920d87ba 100644 --- a/scylla/src/cluster/state.rs +++ b/scylla/src/cluster/state.rs @@ -289,7 +289,7 @@ impl ClusterState { &self, table_spec: &TableSpec, token: Token, - ) -> impl Iterator, Shard)> + Clone { + ) -> impl Iterator, Shard)> + Clone + use<'_> { let keyspace = self.keyspaces.get(table_spec.ks_name()); let strategy = keyspace .map(|k| &k.strategy) @@ -330,7 +330,7 @@ impl ClusterState { pub(crate) fn iter_working_connections_per_node( &self, ) -> Result< - impl Iterator>)> + '_, + impl Iterator> + use<>)> + '_, ConnectionPoolError, > { // The returned iterator is nonempty by nonemptiness invariant of `self.known_peers`. diff --git a/scylla/src/observability/metrics.rs b/scylla/src/observability/metrics.rs index fc481dd177..a0bd3cb069 100644 --- a/scylla/src/observability/metrics.rs +++ b/scylla/src/observability/metrics.rs @@ -477,7 +477,7 @@ impl Metrics { fn percentiles( h: &Histogram, percentiles: &[f64], - ) -> Result, MetricsError> { + ) -> Result + use<>, MetricsError> { let res = h.percentiles(percentiles); match res { diff --git a/scylla/src/policies/load_balancing/default.rs b/scylla/src/policies/load_balancing/default.rs index 0f390d1e3b..0b7af496ad 100644 --- a/scylla/src/policies/load_balancing/default.rs +++ b/scylla/src/policies/load_balancing/default.rs @@ -2766,7 +2766,7 @@ mod latency_awareness { } } - pub(super) fn generate_predicate(&self) -> impl Fn(&Node) -> bool { + pub(super) fn generate_predicate(&self) -> impl Fn(&Node) -> bool + use<> { let last_min_latency = self.last_min_latency.clone(); let node_avgs = self.node_avgs.clone(); let exclusion_threshold = self.exclusion_threshold; diff --git a/scylla/src/response/query_result.rs b/scylla/src/response/query_result.rs index 125e39781a..563ff609f3 100644 --- a/scylla/src/response/query_result.rs +++ b/scylla/src/response/query_result.rs @@ -58,7 +58,7 @@ impl<'slice, 'spec> ColumnSpecs<'slice, 'spec> { /// Returns iterator over specification of columns returned from the database, /// ordered by column order in the response. #[inline] - pub fn iter(&self) -> impl Iterator> { + pub fn iter(&self) -> impl Iterator> + use<'slice, 'spec> { self.specs.iter() } } diff --git a/scylla/src/routing/locator/replication_info.rs b/scylla/src/routing/locator/replication_info.rs index 7cae0ec558..7076441251 100644 --- a/scylla/src/routing/locator/replication_info.rs +++ b/scylla/src/routing/locator/replication_info.rs @@ -129,7 +129,7 @@ impl ReplicationInfo { token: Token, datacenter_name: &str, replication_factor: usize, - ) -> impl Iterator> { + ) -> impl Iterator> + use<'a> { let dc_lb_data: &DatacenterNodes = self .datacenters .get(datacenter_name) diff --git a/scylla/src/routing/locator/test.rs b/scylla/src/routing/locator/test.rs index 478918caa6..98c9d92be4 100644 --- a/scylla/src/routing/locator/test.rs +++ b/scylla/src/routing/locator/test.rs @@ -177,7 +177,7 @@ fn assert_replica_set_equal_to(nodes: ReplicaSet<'_>, ids: &[u16]) { assert_same_node_ids(nodes.into_iter().map(|(node, _shard)| node), ids) } -pub(crate) fn create_ring(metadata: &Metadata) -> impl Iterator)> { +pub(crate) fn create_ring(metadata: &Metadata) -> impl Iterator)> + use<> { let pool_config: PoolConfig = Default::default(); let mut ring: Vec<(Token, Arc)> = Vec::new(); diff --git a/scylla/src/routing/sharding.rs b/scylla/src/routing/sharding.rs index 2b1bad3cdd..b5a504f236 100644 --- a/scylla/src/routing/sharding.rs +++ b/scylla/src/routing/sharding.rs @@ -150,7 +150,7 @@ impl Sharder { /// Stops once all possible ports have been returned /// /// The ports are chosen from ephemeral port range [49152, 65535]. - pub fn iter_source_ports_for_shard(&self, shard: Shard) -> impl Iterator { + pub fn iter_source_ports_for_shard(&self, shard: Shard) -> impl Iterator + use<> { self.iter_source_ports_for_shard_from_range( shard, &ShardAwarePortRange::EPHEMERAL_PORT_RANGE, @@ -166,7 +166,7 @@ impl Sharder { &self, shard: Shard, port_range: &ShardAwarePortRange, - ) -> impl Iterator { + ) -> impl Iterator + use<> { assert!(shard < self.nr_shards.get() as u32); let (range_start, range_end) = (port_range.0.start(), port_range.0.end()); From cb40279ff801c055e34edc4d89de360a9465e454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Tue, 12 Aug 2025 21:29:52 +0200 Subject: [PATCH 11/19] Preparing for 2024 edition: manual changes Running `cargo fix --edition` in previous commit produced a lot of output. Vast majority of it is about drop order of temporaries changing in 2024. I briefly looked through some of those warnings, but I did not see anything interesting. I doubt we rely on this drop order anywhere. The other type of warning is about the RPIT lifetime capture rules. There is a case that the tool does not handle automatically and only warns about: https://doc.rust-lang.org/edition-guide/rust-2024/rpit-lifetime-capture.html#migrating-cases-involving-apit I went through those warnings, and performed the changes manually. --- scylla/src/observability/driver_tracing.rs | 11 ++++++--- scylla/src/policies/load_balancing/default.rs | 24 +++++++++---------- scylla/src/statement/batch.rs | 6 ++--- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/scylla/src/observability/driver_tracing.rs b/scylla/src/observability/driver_tracing.rs index 738da0d4b1..9b41208f21 100644 --- a/scylla/src/observability/driver_tracing.rs +++ b/scylla/src/observability/driver_tracing.rs @@ -165,9 +165,14 @@ impl Drop for RequestSpan { } } -fn partition_key_displayer<'ps, 'res, 'spec: 'ps>( - mut pk_values_iter: impl Iterator)> + 'res + Clone, -) -> impl Display + 'res { +fn partition_key_displayer< + 'ps, + 'res, + 'spec: 'ps, + PkIter: Iterator)> + 'res + Clone, +>( + mut pk_values_iter: PkIter, +) -> impl Display + 'res + use<'res, PkIter> { std::iter::from_fn(move || { pk_values_iter .next() diff --git a/scylla/src/policies/load_balancing/default.rs b/scylla/src/policies/load_balancing/default.rs index 0b7af496ad..0b290976ad 100644 --- a/scylla/src/policies/load_balancing/default.rs +++ b/scylla/src/policies/load_balancing/default.rs @@ -673,15 +673,15 @@ impl DefaultPolicy { /// Respects requested replica order, i.e. if requested, returns replicas ordered /// deterministically (i.e. by token ring order or by tablet definition order), /// else returns replicas in arbitrary order. - fn filtered_replicas<'a>( + fn filtered_replicas<'a, PredicateT: Fn(NodeRef<'a>, Shard) -> bool + 'a>( &'a self, ts: &TokenWithStrategy<'a>, replica_location: NodeLocationCriteria<'a>, - predicate: impl Fn(NodeRef<'a>, Shard) -> bool + 'a, + predicate: PredicateT, cluster: &'a ClusterState, order: ReplicaOrder, table_spec: &TableSpec, - ) -> impl Iterator, Shard)> { + ) -> impl Iterator, Shard)> + use<'a, PredicateT> { let predicate = Self::make_sharded_rack_predicate(predicate, replica_location); let replica_iter = match order { @@ -819,15 +819,15 @@ impl DefaultPolicy { /// by provided location criteria and predicate. /// By default, the replicas are shuffled. /// For LWTs, though, the replicas are instead returned in a deterministic order. - fn maybe_shuffled_replicas<'a>( + fn maybe_shuffled_replicas<'a, PredicateT: Fn(NodeRef<'a>, Shard) -> bool + 'a>( &'a self, ts: &TokenWithStrategy<'a>, replica_location: NodeLocationCriteria<'a>, - predicate: impl Fn(NodeRef<'a>, Shard) -> bool + 'a, + predicate: PredicateT, cluster: &'a ClusterState, statement_type: StatementType, table_spec: &TableSpec, - ) -> impl Iterator, Shard)> { + ) -> impl Iterator, Shard)> + use<'a, PredicateT> { let order = match statement_type { StatementType::Lwt => ReplicaOrder::Deterministic, StatementType::NonLwt => ReplicaOrder::Arbitrary, @@ -882,10 +882,10 @@ impl DefaultPolicy { } /// Wraps a given iterator by shuffling its contents. - fn shuffle<'a>( + fn shuffle<'a, IterT: Iterator, Shard)>>( &self, - iter: impl Iterator, Shard)>, - ) -> impl Iterator, Shard)> { + iter: IterT, + ) -> impl Iterator, Shard)> + use<'a, IterT> { let mut vec: Vec<(NodeRef<'_>, Shard)> = iter.collect(); if let Some(fixed) = self.fixed_seed { @@ -2785,10 +2785,10 @@ mod latency_awareness { } } - pub(super) fn wrap<'a>( + pub(super) fn wrap<'a, FallbackPlanT: Iterator, Option)>>( &self, - fallback: impl Iterator, Option)>, - ) -> impl Iterator, Option)> { + fallback: FallbackPlanT, + ) -> impl Iterator, Option)> + use<'a, FallbackPlanT> { let min_avg_latency = match self.last_min_latency.load() { Some(min_avg) => min_avg, None => return Either::Left(fallback), // noop, as no latency data has been collected yet diff --git a/scylla/src/statement/batch.rs b/scylla/src/statement/batch.rs index d787fd6d4f..4edc0505de 100644 --- a/scylla/src/statement/batch.rs +++ b/scylla/src/statement/batch.rs @@ -308,10 +308,10 @@ pub(crate) mod batch_values { /// that `statement` holds the first prepared statement of the batch (if /// there is one), and that it will be used later to serialize the values. #[allow(clippy::result_large_err)] - pub(crate) fn peek_first_token<'bv>( - values: impl BatchValues + 'bv, + pub(crate) fn peek_first_token<'bv, ValuesT: BatchValues + 'bv>( + values: ValuesT, statement: Option<&BatchStatement>, - ) -> Result<(Option, impl BatchValues + 'bv), ExecutionError> { + ) -> Result<(Option, impl BatchValues + use<'bv, ValuesT>), ExecutionError> { let mut values_iter = values.batch_values_iter(); let (token, first_values) = match statement { Some(BatchStatement::PreparedStatement(ps)) => { From 79ac9d71cc313402a5d1b7070987a6b564fa1a2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Tue, 12 Aug 2025 21:56:24 +0200 Subject: [PATCH 12/19] ClusterDebug: extract printer to a variable Scope changes of temporaries in Rust 2024 would cause compilation error here, because the printer would be dropped too quickly. See more at https://doc.rust-lang.org/edition-guide/rust-2024/temporary-tail-expr-scope.html --- scylla/src/cluster/state.rs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/scylla/src/cluster/state.rs b/scylla/src/cluster/state.rs index ab920d87ba..1ec2222553 100644 --- a/scylla/src/cluster/state.rs +++ b/scylla/src/cluster/state.rs @@ -56,17 +56,19 @@ impl std::fmt::Debug for ClusterStateNeatDebug<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let cluster_state = &self.0; + let ring_printer = { + struct RingSizePrinter(usize); + impl std::fmt::Debug for RingSizePrinter { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "", self.0) + } + } + RingSizePrinter(cluster_state.locator.ring().len()) + }; + f.debug_struct("ClusterState") .field("known_peers", &cluster_state.known_peers) - .field("ring", { - struct RingSizePrinter(usize); - impl std::fmt::Debug for RingSizePrinter { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "", self.0) - } - } - &RingSizePrinter(cluster_state.locator.ring().len()) - }) + .field("ring", &ring_printer) .field("keyspaces", &cluster_state.keyspaces.keys()) .finish_non_exhaustive() } From fe82832fcc1d9b0c548cada968ff562951ef007b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Tue, 12 Aug 2025 21:58:28 +0200 Subject: [PATCH 13/19] tablets_for_table: Return directly Returning a just-bound let variable triggers a lint in Rust 2024. --- scylla/src/routing/locator/tablets.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scylla/src/routing/locator/tablets.rs b/scylla/src/routing/locator/tablets.rs index 51b9b9bafa..00ab17c57f 100644 --- a/scylla/src/routing/locator/tablets.rs +++ b/scylla/src/routing/locator/tablets.rs @@ -498,9 +498,7 @@ impl TabletsInfo { let query_key = TableSpecQueryKey { table_spec }; - let table_tablets = self.tablets.get(&query_key); - - table_tablets + self.tablets.get(&query_key) } pub(crate) fn add_tablet(&mut self, table_spec: TableSpec<'static>, tablet: Tablet) { From 358d73724459a9bc5a81e89428b0ec9e3481406c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Tue, 12 Aug 2025 18:33:29 +0200 Subject: [PATCH 14/19] Bump edition to 2024 I kept rustfmt edition at 2021 for now, because I want to introduce formatting changes in a separate commit. --- docs/book.toml | 2 +- examples/Cargo.toml | 2 +- rustfmt.toml | 2 ++ scylla-cql/Cargo.toml | 2 +- scylla-macros/Cargo.toml | 2 +- scylla-proxy/Cargo.toml | 2 +- scylla/Cargo.toml | 2 +- utils/Cargo.toml | 2 +- 8 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 rustfmt.toml diff --git a/docs/book.toml b/docs/book.toml index e9bb6e9b63..b7d856460d 100644 --- a/docs/book.toml +++ b/docs/book.toml @@ -7,7 +7,7 @@ multilingual = false src = "source" [rust] -edition = "2021" +edition = "2024" [output.html] default-theme = "ayu" diff --git a/examples/Cargo.toml b/examples/Cargo.toml index d4eff93fcb..6f77446a93 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "examples" publish = false version = "0.0.0" diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000000..92844e03ab --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,2 @@ +style_edition = "2021" +edition = "2024" diff --git a/scylla-cql/Cargo.toml b/scylla-cql/Cargo.toml index 605f549f5c..73532961bd 100644 --- a/scylla-cql/Cargo.toml +++ b/scylla-cql/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "scylla-cql" version = "1.3.1" -edition = "2021" +edition = "2024" rust-version = "1.85" description = "CQL data types and primitives, for interacting with ScyllaDB." repository = "https://github.com/scylladb/scylla-rust-driver" diff --git a/scylla-macros/Cargo.toml b/scylla-macros/Cargo.toml index e6fc600832..c77dbee4f4 100644 --- a/scylla-macros/Cargo.toml +++ b/scylla-macros/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "scylla-macros" version = "1.3.1" -edition = "2021" +edition = "2024" rust-version = "1.85" description = "proc macros for the ScyllaDB async CQL driver" repository = "https://github.com/scylladb/scylla-rust-driver" diff --git a/scylla-proxy/Cargo.toml b/scylla-proxy/Cargo.toml index 159cc293df..994ba58314 100644 --- a/scylla-proxy/Cargo.toml +++ b/scylla-proxy/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "scylla-proxy" version = "0.0.4" -edition = "2021" +edition = "2024" rust-version = "1.85" description = "Proxy layer between Scylla driver and cluster that enables testing Scylla drivers' behaviour in unfavourable conditions" repository = "https://github.com/scylladb/scylla-rust-driver" diff --git a/scylla/Cargo.toml b/scylla/Cargo.toml index ea10a911e7..a348377a80 100644 --- a/scylla/Cargo.toml +++ b/scylla/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "scylla" version = "1.3.1" -edition = "2021" +edition = "2024" rust-version = "1.85" description = "Async CQL driver for Rust, optimized for Scylla, fully compatible with Apache Cassandraâ„¢" repository = "https://github.com/scylladb/scylla-rust-driver" diff --git a/utils/Cargo.toml b/utils/Cargo.toml index 5a74cf11eb..1072a569dc 100644 --- a/utils/Cargo.toml +++ b/utils/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "utils" publish = false version = "0.0.0" From 8133f5d74926f3d4161fd628cc7b8d6d3307fba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Tue, 12 Aug 2025 22:06:07 +0200 Subject: [PATCH 15/19] rustfmt: Migrate to 2024 edition Most of the changes are just reordered imports and function/macro calls with long arguments getting split into multiple lines. --- examples/allocations.rs | 4 +- examples/basic.rs | 2 +- examples/custom_load_balancing_policy.rs | 2 +- examples/get_by_name.rs | 2 +- examples/schema_agreement.rs | 2 +- examples/tls-rustls.rs | 2 +- examples/tracing.rs | 2 +- rustfmt.toml | 2 +- scylla-cql/benches/benchmark.rs | 30 +++- scylla-cql/src/_macro_internal.rs | 14 +- scylla-cql/src/deserialize/frame_slice.rs | 2 +- scylla-cql/src/deserialize/result.rs | 4 +- scylla-cql/src/deserialize/row.rs | 28 ++- scylla-cql/src/deserialize/row_tests.rs | 2 +- scylla-cql/src/deserialize/value.rs | 54 ++++-- scylla-cql/src/deserialize/value_tests.rs | 169 ++++++++++-------- scylla-cql/src/frame/frame_errors.rs | 2 +- scylla-cql/src/frame/request/batch.rs | 16 +- scylla-cql/src/frame/request/execute.rs | 4 +- scylla-cql/src/frame/request/mod.rs | 8 +- .../src/frame/response/custom_type_parser.rs | 2 +- scylla-cql/src/frame/response/error.rs | 16 +- scylla-cql/src/frame/response/mod.rs | 2 +- scylla-cql/src/frame/types.rs | 2 +- scylla-cql/src/serialize/batch_tests.rs | 10 +- scylla-cql/src/serialize/row.rs | 17 +- scylla-cql/src/serialize/row_tests.rs | 12 +- scylla-cql/src/serialize/value.rs | 16 +- scylla-cql/src/serialize/value_tests.rs | 4 +- scylla-cql/src/value.rs | 6 +- scylla-macros/src/deserialize/row.rs | 4 +- scylla-macros/src/deserialize/value.rs | 4 +- scylla-macros/src/serialize/row.rs | 4 +- scylla-macros/src/serialize/value.rs | 4 +- scylla-proxy/src/actions.rs | 12 +- scylla-proxy/src/lib.rs | 6 +- scylla-proxy/src/proxy.rs | 12 +- scylla/benches/benchmark.rs | 2 +- scylla/src/client/caching_session.rs | 2 +- scylla/src/client/execution_profile.rs | 10 +- scylla/src/client/pager.rs | 6 +- scylla/src/client/session.rs | 14 +- scylla/src/client/session_builder.rs | 4 +- scylla/src/cloud/config.rs | 26 +-- scylla/src/cluster/control_connection.rs | 2 +- scylla/src/cluster/metadata.rs | 34 ++-- scylla/src/cluster/mod.rs | 2 +- scylla/src/cluster/state.rs | 14 +- scylla/src/cluster/worker.rs | 2 +- scylla/src/errors.rs | 42 +++-- scylla/src/lib.rs | 8 +- scylla/src/network/connection.rs | 78 ++++---- scylla/src/network/connection_pool.rs | 10 +- scylla/src/observability/driver_tracing.rs | 2 +- scylla/src/observability/history.rs | 64 ++++--- scylla/src/observability/tracing.rs | 8 +- scylla/src/policies/load_balancing/default.rs | 35 ++-- scylla/src/policies/load_balancing/plan.rs | 7 +- scylla/src/policies/speculative_execution.rs | 2 +- scylla/src/policies/timestamp_generator.rs | 2 +- scylla/src/response/request_response.rs | 6 +- scylla/src/routing/locator/mod.rs | 11 +- .../routing/locator/precomputed_replicas.rs | 6 +- .../src/routing/locator/replication_info.rs | 4 +- scylla/src/routing/locator/tablets.rs | 8 +- scylla/src/routing/locator/test.rs | 2 +- scylla/src/statement/prepared.rs | 6 +- scylla/src/utils/test_utils.rs | 11 +- scylla/tests/integration/ccm/authenticate.rs | 4 +- scylla/tests/integration/ccm/example.rs | 2 +- scylla/tests/integration/ccm/lib/cluster.rs | 2 +- .../tests/integration/ccm/lib/logged_cmd.rs | 60 +++++-- .../load_balancing/lwt_optimisation.rs | 4 +- .../integration/load_balancing/shards.rs | 4 +- .../load_balancing/simple_strategy.rs | 2 +- .../integration/load_balancing/tablets.rs | 6 +- .../load_balancing/token_awareness.rs | 4 +- scylla/tests/integration/macros/complex_pk.rs | 2 +- .../integration/metadata/configuration.rs | 26 +-- scylla/tests/integration/metadata/contents.rs | 8 +- .../session/cluster_reachability.rs | 4 +- scylla/tests/integration/session/db_errors.rs | 2 +- scylla/tests/integration/session/history.rs | 2 +- scylla/tests/integration/session/pager.rs | 12 +- scylla/tests/integration/session/retries.rs | 2 +- .../integration/session/schema_agreement.rs | 4 +- .../integration/session/self_identity.rs | 2 +- scylla/tests/integration/session/tracing.rs | 4 +- .../tests/integration/session/use_keyspace.rs | 34 ++-- scylla/tests/integration/statements/batch.rs | 12 +- .../integration/statements/consistency.rs | 6 +- .../integration/statements/coordinator.rs | 4 +- .../statements/execution_profiles.rs | 4 +- .../statements/named_bind_markers.rs | 2 +- .../tests/integration/statements/prepared.rs | 11 +- .../integration/statements/timestamps.rs | 16 +- .../statements/transparent_reprepare.rs | 42 +++-- .../integration/statements/unprepared.rs | 4 +- .../integration/types/cql_collections.rs | 4 +- scylla/tests/integration/types/cql_types.rs | 4 +- scylla/tests/integration/types/cql_value.rs | 2 +- scylla/tests/integration/utils.rs | 15 +- utils/src/bin/find_stale_test_keyspaces.rs | 2 +- 103 files changed, 734 insertions(+), 498 deletions(-) diff --git a/examples/allocations.rs b/examples/allocations.rs index 83b913cc8b..768ae1ef6a 100644 --- a/examples/allocations.rs +++ b/examples/allocations.rs @@ -3,12 +3,12 @@ use scylla::client::session::Session; use scylla::client::session_builder::SessionBuilder; use scylla::statement::prepared::PreparedStatement; use std::io::Write; -use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::Arc; +use std::sync::atomic::{AtomicUsize, Ordering}; use tokio::sync::Barrier; -use stats_alloc::{Stats, StatsAlloc, INSTRUMENTED_SYSTEM}; +use stats_alloc::{INSTRUMENTED_SYSTEM, Stats, StatsAlloc}; use std::alloc::System; use clap::{Parser, ValueEnum}; diff --git a/examples/basic.rs b/examples/basic.rs index 081d91a6eb..fc0c8fd498 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -1,10 +1,10 @@ use anyhow::Result; use futures::StreamExt as _; use futures::TryStreamExt as _; +use scylla::DeserializeRow; use scylla::client::session::Session; use scylla::client::session_builder::SessionBuilder; use scylla::value::Row; -use scylla::DeserializeRow; use std::env; #[tokio::main] diff --git a/examples/custom_load_balancing_policy.rs b/examples/custom_load_balancing_policy.rs index 3d85ecb52c..a15557bed2 100644 --- a/examples/custom_load_balancing_policy.rs +++ b/examples/custom_load_balancing_policy.rs @@ -1,6 +1,6 @@ use anyhow::Result; -use rand::rng; use rand::Rng; +use rand::rng; use scylla::client::execution_profile::ExecutionProfile; use scylla::client::session::Session; use scylla::client::session_builder::SessionBuilder; diff --git a/examples/get_by_name.rs b/examples/get_by_name.rs index fa816aa35e..693444d4e2 100644 --- a/examples/get_by_name.rs +++ b/examples/get_by_name.rs @@ -1,4 +1,4 @@ -use anyhow::{anyhow, Result}; +use anyhow::{Result, anyhow}; use scylla::client::session::Session; use scylla::client::session_builder::SessionBuilder; use scylla::value::Row; diff --git a/examples/schema_agreement.rs b/examples/schema_agreement.rs index dc2b5f53e1..3bcd4fc9ef 100644 --- a/examples/schema_agreement.rs +++ b/examples/schema_agreement.rs @@ -1,4 +1,4 @@ -use anyhow::{bail, Result}; +use anyhow::{Result, bail}; use futures::TryStreamExt as _; use scylla::client::session::Session; use scylla::client::session_builder::SessionBuilder; diff --git a/examples/tls-rustls.rs b/examples/tls-rustls.rs index f399132abf..f538157628 100644 --- a/examples/tls-rustls.rs +++ b/examples/tls-rustls.rs @@ -3,7 +3,7 @@ use std::{env, sync::Arc}; use anyhow::Result; use futures::TryStreamExt as _; -use rustls::pki_types::{pem::PemObject, CertificateDer}; +use rustls::pki_types::{CertificateDer, pem::PemObject}; use scylla::client::{session::Session, session_builder::SessionBuilder}; // How to run scylla instance with TLS: diff --git a/examples/tracing.rs b/examples/tracing.rs index e22f33e845..4eaf4add6c 100644 --- a/examples/tracing.rs +++ b/examples/tracing.rs @@ -1,7 +1,7 @@ // CQL Tracing allows to see each step during execution of a query // query() prepare() execute() batch() query_iter() and execute_iter() can be traced -use anyhow::{anyhow, Result}; +use anyhow::{Result, anyhow}; use futures::StreamExt as _; use scylla::client::session::Session; use scylla::client::session_builder::SessionBuilder; diff --git a/rustfmt.toml b/rustfmt.toml index 92844e03ab..f3e454b618 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,2 +1,2 @@ -style_edition = "2021" edition = "2024" +style_edition = "2024" diff --git a/scylla-cql/benches/benchmark.rs b/scylla-cql/benches/benchmark.rs index 359de6368b..86607a7554 100644 --- a/scylla-cql/benches/benchmark.rs +++ b/scylla-cql/benches/benchmark.rs @@ -2,12 +2,12 @@ use std::borrow::Cow; -use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion}; +use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main}; -use scylla_cql::frame::request::query::PagingState; use scylla_cql::frame::request::SerializableRequest; +use scylla_cql::frame::request::query::PagingState; use scylla_cql::frame::response::result::{ColumnType, NativeType}; -use scylla_cql::frame::{request::query, Compression, SerializedRequest}; +use scylla_cql::frame::{Compression, SerializedRequest, request::query}; use scylla_cql::serialize::row::SerializedValues; fn make_query(contents: &str, values: SerializedValues) -> query::Query<'_> { @@ -30,20 +30,34 @@ fn serialized_request_make_bench(c: &mut Criterion) { let mut group = c.benchmark_group("LZ4Compression.SerializedRequest"); let query_args = [ ("INSERT foo INTO ks.table_name (?)", { - values.add_value(&1234, &ColumnType::Native(NativeType::Int)).unwrap(); + values + .add_value(&1234, &ColumnType::Native(NativeType::Int)) + .unwrap(); values.clone() }), ("INSERT foo, bar, baz INTO ks.table_name (?, ?, ?)", { - values.add_value(&"a value", &ColumnType::Native(NativeType::Text)).unwrap(); - values.add_value(&"i am storing a string", &ColumnType::Native(NativeType::Text)).unwrap(); + values + .add_value(&"a value", &ColumnType::Native(NativeType::Text)) + .unwrap(); + values + .add_value( + &"i am storing a string", + &ColumnType::Native(NativeType::Text), + ) + .unwrap(); values.clone() }), ( "INSERT foo, bar, baz, boop, blah INTO longer_keyspace.a_big_table_name (?, ?, ?, ?, 1000)", { - values.add_value(&"dc0c8cd7-d954-47c1-8722-a857941c43fb", &ColumnType::Native(NativeType::Text)).unwrap(); + values + .add_value( + &"dc0c8cd7-d954-47c1-8722-a857941c43fb", + &ColumnType::Native(NativeType::Text), + ) + .unwrap(); values.clone() - } + }, ), ]; let queries = query_args.map(|(q, v)| make_query(q, v)); diff --git a/scylla-cql/src/_macro_internal.rs b/scylla-cql/src/_macro_internal.rs index 92b0c0e8b4..4327ab72c8 100644 --- a/scylla-cql/src/_macro_internal.rs +++ b/scylla-cql/src/_macro_internal.rs @@ -2,19 +2,19 @@ pub use crate::frame::response::result::{ColumnSpec, ColumnType}; pub use crate::{DeserializeRow, DeserializeValue, SerializeRow, SerializeValue}; pub use crate::deserialize::row::{ - deser_error_replace_rust_name as row_deser_error_replace_rust_name, - mk_deser_err as mk_row_deser_err, mk_typck_err as mk_row_typck_err, BuiltinDeserializationError as BuiltinRowDeserializationError, BuiltinDeserializationErrorKind as BuiltinRowDeserializationErrorKind, BuiltinTypeCheckErrorKind as DeserBuiltinRowTypeCheckErrorKind, ColumnIterator, DeserializeRow, + deser_error_replace_rust_name as row_deser_error_replace_rust_name, + mk_deser_err as mk_row_deser_err, mk_typck_err as mk_row_typck_err, }; pub use crate::deserialize::value::{ - deser_error_replace_rust_name as value_deser_error_replace_rust_name, - mk_deser_err as mk_value_deser_err, mk_typck_err as mk_value_typck_err, BuiltinDeserializationError as BuiltinTypeDeserializationError, BuiltinDeserializationErrorKind as BuiltinTypeDeserializationErrorKind, BuiltinTypeCheckErrorKind as DeserBuiltinTypeTypeCheckErrorKind, DeserializeValue, UdtDeserializationErrorKind, UdtIterator, UdtTypeCheckErrorKind as DeserUdtTypeCheckErrorKind, + deser_error_replace_rust_name as value_deser_error_replace_rust_name, + mk_deser_err as mk_value_deser_err, mk_typck_err as mk_value_typck_err, }; pub use crate::deserialize::{DeserializationError, FrameSlice, TypeCheckError}; pub use crate::serialize::row::{ @@ -121,13 +121,13 @@ pub mod ser { use crate::{ frame::response::result::ColumnSpec, serialize::{ + RowWriter, SerializationError, row::{ - mk_ser_err, BuiltinSerializationErrorKind, BuiltinTypeCheckErrorKind, - RowSerializationContext, + BuiltinSerializationErrorKind, BuiltinTypeCheckErrorKind, + RowSerializationContext, mk_ser_err, }, value::SerializeValue, writers::WrittenCellProof, - RowWriter, SerializationError, }, }; diff --git a/scylla-cql/src/deserialize/frame_slice.rs b/scylla-cql/src/deserialize/frame_slice.rs index 3423ed8d57..e3ad7b0cee 100644 --- a/scylla-cql/src/deserialize/frame_slice.rs +++ b/scylla-cql/src/deserialize/frame_slice.rs @@ -195,7 +195,7 @@ impl<'frame> FrameSlice<'frame> { mod tests { use bytes::Bytes; - use super::super::tests::{serialize_cells, CELL1, CELL2}; + use super::super::tests::{CELL1, CELL2, serialize_cells}; use super::FrameSlice; #[test] diff --git a/scylla-cql/src/deserialize/result.rs b/scylla-cql/src/deserialize/result.rs index aad3117f78..b2d4ac5cce 100644 --- a/scylla-cql/src/deserialize/result.rs +++ b/scylla-cql/src/deserialize/result.rs @@ -9,7 +9,7 @@ use crate::frame::response::result::{ ColumnSpec, DeserializedMetadataAndRawRows, ResultMetadata, ResultMetadataHolder, }; -use super::row::{mk_deser_err, BuiltinDeserializationErrorKind, ColumnIterator, DeserializeRow}; +use super::row::{BuiltinDeserializationErrorKind, ColumnIterator, DeserializeRow, mk_deser_err}; use super::{DeserializationError, FrameSlice, TypeCheckError}; use std::marker::PhantomData; @@ -251,7 +251,7 @@ mod tests { ColumnSpec, ColumnType, DeserializedMetadataAndRawRows, NativeType, ResultMetadata, }; - use super::super::tests::{serialize_cells, spec, CELL1, CELL2}; + use super::super::tests::{CELL1, CELL2, serialize_cells, spec}; use super::{ ColumnIterator, DeserializationError, FrameSlice, RawRowIterator, RawRowLendingIterator, TypedRowIterator, diff --git a/scylla-cql/src/deserialize/row.rs b/scylla-cql/src/deserialize/row.rs index 7b26dad11d..47781865d6 100644 --- a/scylla-cql/src/deserialize/row.rs +++ b/scylla-cql/src/deserialize/row.rs @@ -8,7 +8,7 @@ use std::fmt::Display; use thiserror::Error; use super::value::DeserializeValue; -use super::{make_error_replace_rust_name, DeserializationError, FrameSlice, TypeCheckError}; +use super::{DeserializationError, FrameSlice, TypeCheckError, make_error_replace_rust_name}; use crate::frame::response::result::{ColumnSpec, ColumnType}; use crate::value::{CqlValue, Row}; @@ -264,7 +264,9 @@ impl_tuple_multiple!( /// Failed to type check incoming result column types again given Rust type, /// one of the types having support built into the driver. #[derive(Debug, Error, Clone)] -#[error("Failed to type check the Rust type {rust_name} against CQL column types {cql_types:?} : {kind}")] +#[error( + "Failed to type check the Rust type {rust_name} against CQL column types {cql_types:?} : {kind}" +)] pub struct BuiltinTypeCheckError { /// Name of the Rust type used to represent the values. pub rust_name: &'static str, @@ -371,9 +373,15 @@ impl Display for BuiltinTypeCheckErrorKind { rust_cols, cql_cols, } => { - write!(f, "wrong column count: the statement operates on {cql_cols} columns, but the given rust types contains {rust_cols}") + write!( + f, + "wrong column count: the statement operates on {cql_cols} columns, but the given rust types contains {rust_cols}" + ) } - BuiltinTypeCheckErrorKind::ColumnWithUnknownName { column_name, column_index } => { + BuiltinTypeCheckErrorKind::ColumnWithUnknownName { + column_name, + column_index, + } => { write!( f, "the CQL row contains a column {column_name} at column index {column_index}, but the corresponding field is not found in the Rust type", @@ -384,11 +392,12 @@ impl Display for BuiltinTypeCheckErrorKind { f, "values for columns {column_names:?} are missing from the DB data but are required by the Rust type" ) - }, + } BuiltinTypeCheckErrorKind::ColumnNameMismatch { field_index, - column_index,rust_column_name, - db_column_name + column_index, + rust_column_name, + db_column_name, } => write!( f, "expected column with name {db_column_name} at column index {column_index}, but the Rust field name at corresponding field index {field_index} is {rust_column_name}", @@ -401,7 +410,10 @@ impl Display for BuiltinTypeCheckErrorKind { f, "mismatched types in column {column_name} at index {column_index}: {err}" ), - BuiltinTypeCheckErrorKind::DuplicatedColumn { column_name, column_index } => write!( + BuiltinTypeCheckErrorKind::DuplicatedColumn { + column_name, + column_index, + } => write!( f, "column {column_name} occurs more than once in DB metadata; second occurrence is at column index {column_index}", ), diff --git a/scylla-cql/src/deserialize/row_tests.rs b/scylla-cql/src/deserialize/row_tests.rs index 7e3e0cd1f2..333b70fcc4 100644 --- a/scylla-cql/src/deserialize/row_tests.rs +++ b/scylla-cql/src/deserialize/row_tests.rs @@ -3,7 +3,7 @@ use bytes::Bytes; use scylla_macros::DeserializeRow; use crate::deserialize::row::BuiltinDeserializationErrorKind; -use crate::deserialize::{value, DeserializationError, FrameSlice}; +use crate::deserialize::{DeserializationError, FrameSlice, value}; use crate::frame::response::result::{ColumnSpec, ColumnType, NativeType, TableSpec}; use super::super::tests::{serialize_cells, spec}; diff --git a/scylla-cql/src/deserialize/value.rs b/scylla-cql/src/deserialize/value.rs index ecdd0684b2..3d980f6c27 100644 --- a/scylla-cql/src/deserialize/value.rs +++ b/scylla-cql/src/deserialize/value.rs @@ -15,7 +15,7 @@ use std::fmt::Display; use thiserror::Error; -use super::{make_error_replace_rust_name, DeserializationError, FrameSlice, TypeCheckError}; +use super::{DeserializationError, FrameSlice, TypeCheckError, make_error_replace_rust_name}; use crate::frame::frame_errors::LowLevelDeserializationError; use crate::frame::response::result::CollectionType; use crate::frame::response::result::UserDefinedType; @@ -23,8 +23,8 @@ use crate::frame::response::result::{ColumnType, NativeType}; use crate::frame::types; use crate::value::CqlVarintBorrowed; use crate::value::{ - deser_cql_value, Counter, CqlDate, CqlDecimal, CqlDecimalBorrowed, CqlDuration, CqlTime, - CqlTimestamp, CqlTimeuuid, CqlValue, CqlVarint, + Counter, CqlDate, CqlDecimal, CqlDecimalBorrowed, CqlDuration, CqlTime, CqlTimestamp, + CqlTimeuuid, CqlValue, CqlVarint, deser_cql_value, }; /// A type that can be deserialized from a column value inside a row that was @@ -1890,12 +1890,12 @@ impl Display for SetOrListTypeCheckErrorKind { #[non_exhaustive] pub enum VectorTypeCheckErrorKind { /// The CQL type is not a vector. - #[error( - "the CQL type the Rust type was attempted to be type checked against was not a vector" - )] + #[error("the CQL type the Rust type was attempted to be type checked against was not a vector")] NotVector, /// Incompatible element types. - #[error("the vector element types between the CQL type and the Rust type failed to type check against each other: {0}")] + #[error( + "the vector element types between the CQL type and the Rust type failed to type check against each other: {0}" + )] ElementTypeCheckFailed(TypeCheckError), } @@ -1971,7 +1971,7 @@ impl Display for TupleTypeCheckErrorKind { TupleTypeCheckErrorKind::FieldTypeCheckFailed { position, err } => write!( f, "the CQL type and the Rust type of the tuple field {position} failed to type check against each other: {err}" - ) + ), } } } @@ -2038,9 +2038,16 @@ impl Display for UdtTypeCheckErrorKind { "the CQL type the Rust type was attempted to be type checked against is not a UDT" ), UdtTypeCheckErrorKind::ValuesMissingForUdtFields { field_names } => { - write!(f, "the fields {field_names:?} are missing from the DB data but are required by the Rust type") - }, - UdtTypeCheckErrorKind::FieldNameMismatch { rust_field_name, db_field_name, position } => write!( + write!( + f, + "the fields {field_names:?} are missing from the DB data but are required by the Rust type" + ) + } + UdtTypeCheckErrorKind::FieldNameMismatch { + rust_field_name, + db_field_name, + position, + } => write!( f, "expected field with name {db_field_name} at position {position}, but the Rust field name is {rust_field_name}" ), @@ -2052,7 +2059,10 @@ impl Display for UdtTypeCheckErrorKind { f, "field {field_name} occurs more than once in CQL UDT type" ), - UdtTypeCheckErrorKind::TooFewFields { required_fields, present_fields } => write!( + UdtTypeCheckErrorKind::TooFewFields { + required_fields, + present_fields, + } => write!( f, "fewer fields present in the UDT than required by the Rust type: UDT has {present_fields:?}, Rust type requires {required_fields:?}", ), @@ -2156,16 +2166,22 @@ pub enum BuiltinDeserializationErrorKind { impl Display for BuiltinDeserializationErrorKind { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - BuiltinDeserializationErrorKind::BadDate { date_field, err } => write!(f, "malformed {date_field} during 'date' deserialization: {err}"), - BuiltinDeserializationErrorKind::BadDecimalScale(err) => write!(f, "malformed decimal's scale: {err}"), - BuiltinDeserializationErrorKind::RawCqlBytesReadError(err) => write!(f, "failed to read raw cql value bytes: {err}"), + BuiltinDeserializationErrorKind::BadDate { date_field, err } => write!( + f, + "malformed {date_field} during 'date' deserialization: {err}" + ), + BuiltinDeserializationErrorKind::BadDecimalScale(err) => { + write!(f, "malformed decimal's scale: {err}") + } + BuiltinDeserializationErrorKind::RawCqlBytesReadError(err) => { + write!(f, "failed to read raw cql value bytes: {err}") + } BuiltinDeserializationErrorKind::ExpectedNonNull => { f.write_str("expected a non-null value, got null") } - BuiltinDeserializationErrorKind::ByteLengthMismatch { expected, got } => write!( - f, - "the CQL type requires {expected} bytes, but got {got}", - ), + BuiltinDeserializationErrorKind::ByteLengthMismatch { expected, got } => { + write!(f, "the CQL type requires {expected} bytes, but got {got}",) + } BuiltinDeserializationErrorKind::ExpectedAscii => { f.write_str("expected a valid ASCII string") } diff --git a/scylla-cql/src/deserialize/value_tests.rs b/scylla-cql/src/deserialize/value_tests.rs index a74cf32bd9..855315bc1b 100644 --- a/scylla-cql/src/deserialize/value_tests.rs +++ b/scylla-cql/src/deserialize/value_tests.rs @@ -16,8 +16,8 @@ use crate::frame::frame_errors::CustomTypeParseError; use crate::frame::response::custom_type_parser::CustomTypeParser; use crate::frame::response::result::NativeType::*; use crate::frame::response::result::{CollectionType, ColumnType, NativeType, UserDefinedType}; -use crate::serialize::value::SerializeValue; use crate::serialize::CellWriter; +use crate::serialize::value::SerializeValue; use crate::utils::parse::ParseErrorCause; use crate::value::{ Counter, CqlDate, CqlDecimal, CqlDecimalBorrowed, CqlDuration, CqlTime, CqlTimestamp, @@ -25,84 +25,85 @@ use crate::value::{ }; use super::{ - mk_deser_err, BuiltinDeserializationError, BuiltinDeserializationErrorKind, - BuiltinTypeCheckError, BuiltinTypeCheckErrorKind, DeserializeValue, ListlikeIterator, - MapDeserializationErrorKind, MapIterator, MapTypeCheckErrorKind, MaybeEmpty, - SetOrListDeserializationErrorKind, SetOrListTypeCheckErrorKind, UdtDeserializationErrorKind, - UdtTypeCheckErrorKind, + BuiltinDeserializationError, BuiltinDeserializationErrorKind, BuiltinTypeCheckError, + BuiltinTypeCheckErrorKind, DeserializeValue, ListlikeIterator, MapDeserializationErrorKind, + MapIterator, MapTypeCheckErrorKind, MaybeEmpty, SetOrListDeserializationErrorKind, + SetOrListTypeCheckErrorKind, UdtDeserializationErrorKind, UdtTypeCheckErrorKind, mk_deser_err, }; #[test] fn test_custom_cassandra_type_parser() { let tests = vec![ - ( - "org.apache.cassandra.db.marshal.VectorType(org.apache.cassandra.db.marshal.Int32Type, 5)", - ColumnType::Vector { - typ: Box::new(ColumnType::Native(NativeType::Int)), - dimensions: 5, - }, - ), - ( "636f6c756d6e:org.apache.cassandra.db.marshal.ListType(org.apache.cassandra.db.marshal.Int32Type)", - ColumnType::Collection { - frozen: false, - typ: CollectionType::List(Box::new(ColumnType::Native(NativeType::Int))), - } - ), - ( - "org.apache.cassandra.db.marshal.SetType(org.apache.cassandra.db.marshal.Int32Type)", - ColumnType::Collection { - frozen: false, - typ: CollectionType::Set(Box::new(ColumnType::Native(NativeType::Int))), - }, - ), - ( - "org.apache.cassandra.db.marshal.MapType(org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.Int32Type)", - ColumnType::Collection { - frozen: false, - typ: CollectionType::Map( - Box::new(ColumnType::Native(NativeType::Int)), - Box::new(ColumnType::Native(NativeType::Int)), - ), - }, - ), - ( - "org.apache.cassandra.db.marshal.DurationType", - ColumnType::Native(NativeType::Duration) - ), - ( - "org.apache.cassandra.db.marshal.TupleType(org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.Int32Type)", - ColumnType::Tuple(vec![ - ColumnType::Native(NativeType::Int), - ColumnType::Native(NativeType::Int) - ]), - ), - ( - "org.apache.cassandra.db.marshal.UserType(keyspace1,61646472657373,737472656574:org.apache.cassandra.db.marshal.UTF8Type,63697479:org.apache.cassandra.db.marshal.UTF8Type,7a6970:org.apache.cassandra.db.marshal.Int32Type)", - ColumnType::UserDefinedType { - frozen: false, - definition: Arc::new(UserDefinedType { - name: "address".into(), - keyspace: "keyspace1".into(), - field_types: vec![ - ("street".into(), ColumnType::Native(NativeType::Text)), - ("city".into(), ColumnType::Native(NativeType::Text)), - ("zip".into(), ColumnType::Native(NativeType::Int)) - ] - }), - } - ), - ( "org.apache.cassandra.db.marshal.MapType(org.apache.cassandra.db.marshal.Int32Type, org.apache.cassandra.db.marshal.TupleType(org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.Int32Type))", - ColumnType::Collection { - frozen: false, - typ: CollectionType::Map( - Box::new(ColumnType::Native(NativeType::Int)), - Box::new(ColumnType::Tuple(vec![ - ColumnType::Native(NativeType::Int), - ColumnType::Native(NativeType::Int) - ])) - ) - } - ) + ( + "org.apache.cassandra.db.marshal.VectorType(org.apache.cassandra.db.marshal.Int32Type, 5)", + ColumnType::Vector { + typ: Box::new(ColumnType::Native(NativeType::Int)), + dimensions: 5, + }, + ), + ( + "636f6c756d6e:org.apache.cassandra.db.marshal.ListType(org.apache.cassandra.db.marshal.Int32Type)", + ColumnType::Collection { + frozen: false, + typ: CollectionType::List(Box::new(ColumnType::Native(NativeType::Int))), + }, + ), + ( + "org.apache.cassandra.db.marshal.SetType(org.apache.cassandra.db.marshal.Int32Type)", + ColumnType::Collection { + frozen: false, + typ: CollectionType::Set(Box::new(ColumnType::Native(NativeType::Int))), + }, + ), + ( + "org.apache.cassandra.db.marshal.MapType(org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.Int32Type)", + ColumnType::Collection { + frozen: false, + typ: CollectionType::Map( + Box::new(ColumnType::Native(NativeType::Int)), + Box::new(ColumnType::Native(NativeType::Int)), + ), + }, + ), + ( + "org.apache.cassandra.db.marshal.DurationType", + ColumnType::Native(NativeType::Duration), + ), + ( + "org.apache.cassandra.db.marshal.TupleType(org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.Int32Type)", + ColumnType::Tuple(vec![ + ColumnType::Native(NativeType::Int), + ColumnType::Native(NativeType::Int), + ]), + ), + ( + "org.apache.cassandra.db.marshal.UserType(keyspace1,61646472657373,737472656574:org.apache.cassandra.db.marshal.UTF8Type,63697479:org.apache.cassandra.db.marshal.UTF8Type,7a6970:org.apache.cassandra.db.marshal.Int32Type)", + ColumnType::UserDefinedType { + frozen: false, + definition: Arc::new(UserDefinedType { + name: "address".into(), + keyspace: "keyspace1".into(), + field_types: vec![ + ("street".into(), ColumnType::Native(NativeType::Text)), + ("city".into(), ColumnType::Native(NativeType::Text)), + ("zip".into(), ColumnType::Native(NativeType::Int)), + ], + }), + }, + ), + ( + "org.apache.cassandra.db.marshal.MapType(org.apache.cassandra.db.marshal.Int32Type, org.apache.cassandra.db.marshal.TupleType(org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.Int32Type))", + ColumnType::Collection { + frozen: false, + typ: CollectionType::Map( + Box::new(ColumnType::Native(NativeType::Int)), + Box::new(ColumnType::Tuple(vec![ + ColumnType::Native(NativeType::Int), + ColumnType::Native(NativeType::Int), + ])), + ), + }, + ), ]; for (input, expected) in tests { @@ -137,12 +138,16 @@ fn test_custom_cassandra_type_parser_errors() { ); assert_eq!( - CustomTypeParser::parse("org.apache.cassandra.db.marshal.UserType(keyspace1,gg,org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.Int32Type)"), + CustomTypeParser::parse( + "org.apache.cassandra.db.marshal.UserType(keyspace1,gg,org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.Int32Type)" + ), Err(CustomTypeParseError::BadHexString("gg".to_string())) ); assert_eq!( - CustomTypeParser::parse("org.apache.cassandra.db.marshal.UserType(keyspace1,ff,org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.Int32Type)"), + CustomTypeParser::parse( + "org.apache.cassandra.db.marshal.UserType(keyspace1,ff,org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.Int32Type)" + ), Err(CustomTypeParseError::InvalidUtf8(vec![0xff])) ); @@ -154,13 +159,19 @@ fn test_custom_cassandra_type_parser_errors() { ); assert_eq!( - CustomTypeParser::parse("org.apache.cassandra.db.marshal.UserType(keyspace1,61646472657373,737472656574#org.apache.cassandra.db.marshal.UTF8Type)"), + CustomTypeParser::parse( + "org.apache.cassandra.db.marshal.UserType(keyspace1,61646472657373,737472656574#org.apache.cassandra.db.marshal.UTF8Type)" + ), Err(CustomTypeParseError::UnexpectedCharacter('#', ':')) ); assert_eq!( - CustomTypeParser::parse("org.apache.cassandra.db.marshal.VectorType(org.apache.cassandra.db.marshal.Int32Type, asdf)"), - Err(CustomTypeParseError::IntegerParseError(ParseErrorCause::Other("Expected 16-bit unsigned integer"))) + CustomTypeParser::parse( + "org.apache.cassandra.db.marshal.VectorType(org.apache.cassandra.db.marshal.Int32Type, asdf)" + ), + Err(CustomTypeParseError::IntegerParseError( + ParseErrorCause::Other("Expected 16-bit unsigned integer") + )) ) } diff --git a/scylla-cql/src/frame/frame_errors.rs b/scylla-cql/src/frame/frame_errors.rs index 9f19aaad9c..344d0fe89a 100644 --- a/scylla-cql/src/frame/frame_errors.rs +++ b/scylla-cql/src/frame/frame_errors.rs @@ -13,8 +13,8 @@ pub use super::request::{ startup::StartupSerializationError, }; -use super::response::CqlResponseKind; use super::TryFromPrimitiveError; +use super::response::CqlResponseKind; use crate::utils::parse::ParseErrorCause; use thiserror::Error; diff --git a/scylla-cql/src/frame/request/batch.rs b/scylla-cql/src/frame/request/batch.rs index e552da03a2..3a0ae25008 100644 --- a/scylla-cql/src/frame/request/batch.rs +++ b/scylla-cql/src/frame/request/batch.rs @@ -10,9 +10,9 @@ use crate::frame::{ types::{self, SerialConsistency}, }; use crate::serialize::{ + RowWriter, SerializationError, raw_batch::{RawBatchValues, RawBatchValuesIterator}, row::SerializedValues, - RowWriter, SerializationError, }; use super::{DeserializableRequest, RequestDeserializationError}; @@ -163,7 +163,7 @@ where error: BatchStatementSerializationError::TooManyValues( row_writer.value_count(), ), - }) + }); } }; buf[length_pos..length_pos + 2].copy_from_slice(&count.to_be_bytes()); @@ -336,11 +336,15 @@ impl<'b> DeserializableRequest for Batch<'b, BatchStatement<'b>, Vec CustomTypeParser<'result> { _ => { return Err(CustomTypeParseError::UnknownSimpleCustomTypeName( name.into(), - )) + )); } }; Ok(ColumnType::Native(native)) diff --git a/scylla-cql/src/frame/response/error.rs b/scylla-cql/src/frame/response/error.rs index e9eee93eaa..8657b72de2 100644 --- a/scylla-cql/src/frame/response/error.rs +++ b/scylla-cql/src/frame/response/error.rs @@ -1,9 +1,9 @@ //! CQL protocol-level representation of an `ERROR` response. +use crate::Consistency; use crate::frame::frame_errors::{CqlErrorParseError, LowLevelDeserializationError}; use crate::frame::protocol_features::ProtocolFeatures; use crate::frame::types; -use crate::Consistency; use byteorder::ReadBytesExt; use bytes::Bytes; use thiserror::Error; @@ -234,8 +234,10 @@ pub enum DbError { TruncateError, /// Not enough nodes responded to the read request in time to satisfy required consistency level - #[error("Not enough nodes responded to the read request in time to satisfy required consistency level \ - (consistency: {consistency}, received: {received}, required: {required}, data_present: {data_present})")] + #[error( + "Not enough nodes responded to the read request in time to satisfy required consistency level \ + (consistency: {consistency}, received: {received}, required: {required}, data_present: {data_present})" + )] ReadTimeout { /// Consistency level of the query consistency: Consistency, @@ -248,8 +250,10 @@ pub enum DbError { }, /// Not enough nodes responded to the write request in time to satisfy required consistency level - #[error("Not enough nodes responded to the write request in time to satisfy required consistency level \ - (consistency: {consistency}, received: {received}, required: {required}, write_type: {write_type})")] + #[error( + "Not enough nodes responded to the write request in time to satisfy required consistency level \ + (consistency: {consistency}, received: {received}, required: {required}, write_type: {write_type})" + )] WriteTimeout { /// Consistency level of the query consistency: Consistency, @@ -523,8 +527,8 @@ impl WriteType { #[cfg(test)] mod tests { use super::{DbError, Error, OperationType, WriteType}; - use crate::frame::protocol_features::ProtocolFeatures; use crate::Consistency; + use crate::frame::protocol_features::ProtocolFeatures; use bytes::Bytes; use std::convert::TryInto; diff --git a/scylla-cql/src/frame/response/mod.rs b/scylla-cql/src/frame/response/mod.rs index ed3c6369dc..9ec6ad8dac 100644 --- a/scylla-cql/src/frame/response/mod.rs +++ b/scylla-cql/src/frame/response/mod.rs @@ -12,9 +12,9 @@ use std::sync::Arc; pub use error::Error; pub use supported::Supported; +use crate::frame::TryFromPrimitiveError; use crate::frame::protocol_features::ProtocolFeatures; use crate::frame::response::result::ResultMetadata; -use crate::frame::TryFromPrimitiveError; use super::frame_errors::CqlResponseParseError; diff --git a/scylla-cql/src/frame/types.rs b/scylla-cql/src/frame/types.rs index e0dc2826e2..fe883cf87b 100644 --- a/scylla-cql/src/frame/types.rs +++ b/scylla-cql/src/frame/types.rs @@ -1,7 +1,7 @@ //! CQL binary protocol in-wire types. -use super::frame_errors::LowLevelDeserializationError; use super::TryFromPrimitiveError; +use super::frame_errors::LowLevelDeserializationError; use byteorder::{BigEndian, ReadBytesExt}; use bytes::Bytes; #[cfg(test)] diff --git a/scylla-cql/src/serialize/batch_tests.rs b/scylla-cql/src/serialize/batch_tests.rs index db8b4160bf..dace5e23f9 100644 --- a/scylla-cql/src/serialize/batch_tests.rs +++ b/scylla-cql/src/serialize/batch_tests.rs @@ -1,8 +1,8 @@ use crate::frame::response::result::NativeType; use crate::frame::response::result::{ColumnSpec, ColumnType, TableSpec}; +use crate::serialize::RowWriter; use crate::serialize::batch::{BatchValues, BatchValuesIterator}; use crate::serialize::row::RowSerializationContext; -use crate::serialize::RowWriter; use assert_matches::assert_matches; use bytes::BufMut; @@ -66,7 +66,9 @@ fn slice_batch_values() { let request = serialize_batch_value_iterator(&mut iter, cols); assert_eq!( request, - vec![0, 4, 0, 0, 0, 1, 2, 0, 0, 0, 1, 3, 0, 0, 0, 1, 4, 0, 0, 0, 1, 5] + vec![ + 0, 4, 0, 0, 0, 1, 2, 0, 0, 0, 1, 3, 0, 0, 0, 1, 4, 0, 0, 0, 1, 5 + ] ); } @@ -114,7 +116,9 @@ fn vec_batch_values() { let request = serialize_batch_value_iterator(&mut iter, cols); assert_eq!( request, - vec![0, 4, 0, 0, 0, 1, 2, 0, 0, 0, 1, 3, 0, 0, 0, 1, 4, 0, 0, 0, 1, 5] + vec![ + 0, 4, 0, 0, 0, 1, 2, 0, 0, 0, 1, 3, 0, 0, 0, 1, 4, 0, 0, 0, 1, 5 + ] ); } diff --git a/scylla-cql/src/serialize/row.rs b/scylla-cql/src/serialize/row.rs index 348a2dfa40..cc8991a6bd 100644 --- a/scylla-cql/src/serialize/row.rs +++ b/scylla-cql/src/serialize/row.rs @@ -186,7 +186,7 @@ macro_rules! impl_serialize_row_for_map { BuiltinTypeCheckErrorKind::ValueMissingForColumn { name: col.name().to_owned(), }, - )) + )); } Some(v) => { $crate::_macro_internal::ser::row::serialize_column::( @@ -408,8 +408,14 @@ pub enum BuiltinTypeCheckErrorKind { impl Display for BuiltinTypeCheckErrorKind { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - BuiltinTypeCheckErrorKind::WrongColumnCount { rust_cols, cql_cols } => { - write!(f, "wrong column count: the statement operates on {cql_cols} columns, but the given rust type provides {rust_cols}") + BuiltinTypeCheckErrorKind::WrongColumnCount { + rust_cols, + cql_cols, + } => { + write!( + f, + "wrong column count: the statement operates on {cql_cols} columns, but the given rust type provides {rust_cols}" + ) } BuiltinTypeCheckErrorKind::NoColumnWithName { name } => { write!( @@ -423,7 +429,10 @@ impl Display for BuiltinTypeCheckErrorKind { "value for column {name} was not provided, but the query requires it" ) } - BuiltinTypeCheckErrorKind::ColumnNameMismatch { rust_column_name, db_column_name } => write!( + BuiltinTypeCheckErrorKind::ColumnNameMismatch { + rust_column_name, + db_column_name, + } => write!( f, "expected column with name {db_column_name} at given position, but the Rust field name is {rust_column_name}" ), diff --git a/scylla-cql/src/serialize/row_tests.rs b/scylla-cql/src/serialize/row_tests.rs index af0e71658b..56ccc6b313 100644 --- a/scylla-cql/src/serialize/row_tests.rs +++ b/scylla-cql/src/serialize/row_tests.rs @@ -1,6 +1,7 @@ use std::borrow::Cow; use std::collections::BTreeMap; +use crate::SerializeRow; use crate::frame::response::result::{ CollectionType, ColumnSpec, ColumnType, NativeType, TableSpec, }; @@ -12,12 +13,11 @@ use crate::serialize::row::{ }; use crate::serialize::value::tests::get_ser_err as get_value_ser_err; use crate::serialize::value::{ - mk_ser_err, BuiltinSerializationErrorKind as BuiltinValueSerializationErrorKind, + BuiltinSerializationErrorKind as BuiltinValueSerializationErrorKind, mk_ser_err, }; use crate::serialize::writers::WrittenCellProof; use crate::serialize::{CellWriter, RowWriter, SerializationError}; use crate::value::MaybeUnset; -use crate::SerializeRow; use assert_matches::assert_matches; @@ -561,9 +561,11 @@ fn test_serialized_values_max_capacity() { .unwrap_err(); assert_eq!(values.iter().count(), 65535); - assert!(values - .iter() - .all(|v| v == RawValue::Value(&[0, 0, 0, 0, 0x07, 0x5b, 0xcd, 0x15]))) + assert!( + values + .iter() + .all(|v| v == RawValue::Value(&[0, 0, 0, 0, 0x07, 0x5b, 0xcd, 0x15])) + ) } #[derive(SerializeRow, Debug)] diff --git a/scylla-cql/src/serialize/value.rs b/scylla-cql/src/serialize/value.rs index a3ce82ea1d..a56729e7c0 100644 --- a/scylla-cql/src/serialize/value.rs +++ b/scylla-cql/src/serialize/value.rs @@ -642,7 +642,7 @@ fn serialize_cql_value<'b>( return Err(mk_typck_err::( typ, TupleTypeCheckErrorKind::NotTuple, - )) + )); } }; serialize_tuple_like(typ, fields.iter(), t.iter(), writer) @@ -1484,7 +1484,9 @@ pub enum UdtTypeCheckErrorKind { impl Display for UdtTypeCheckErrorKind { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - UdtTypeCheckErrorKind::NotUdt => f.write_str("the CQL type the Rust type was attempted to be type checked against is not a UDT"), + UdtTypeCheckErrorKind::NotUdt => f.write_str( + "the CQL type the Rust type was attempted to be type checked against is not a UDT", + ), UdtTypeCheckErrorKind::NameMismatch { keyspace, type_name, @@ -1493,13 +1495,19 @@ impl Display for UdtTypeCheckErrorKind { "the Rust UDT name does not match the actual CQL UDT name ({keyspace}.{type_name})" ), UdtTypeCheckErrorKind::ValueMissingForUdtField { field_name } => { - write!(f, "the field {field_name} is missing in the Rust data but is required by the CQL UDT type") + write!( + f, + "the field {field_name} is missing in the Rust data but is required by the CQL UDT type" + ) } UdtTypeCheckErrorKind::NoSuchFieldInUdt { field_name } => write!( f, "the field {field_name} that is present in the Rust data is not present in the CQL type" ), - UdtTypeCheckErrorKind::FieldNameMismatch { rust_field_name, db_field_name } => write!( + UdtTypeCheckErrorKind::FieldNameMismatch { + rust_field_name, + db_field_name, + } => write!( f, "expected field with name {db_field_name} at given position, but the Rust field name is {rust_field_name}" ), diff --git a/scylla-cql/src/serialize/value_tests.rs b/scylla-cql/src/serialize/value_tests.rs index f804b164d7..4601e332ef 100644 --- a/scylla-cql/src/serialize/value_tests.rs +++ b/scylla-cql/src/serialize/value_tests.rs @@ -1,3 +1,4 @@ +use crate::SerializeValue; use crate::frame::response::result::{CollectionType, ColumnType, NativeType, UserDefinedType}; use crate::serialize::value::{ BuiltinSerializationError, BuiltinSerializationErrorKind, BuiltinTypeCheckError, @@ -11,7 +12,6 @@ use crate::value::{ Counter, CqlDate, CqlDuration, CqlTime, CqlTimestamp, CqlTimeuuid, CqlValue, CqlVarint, MaybeUnset, Unset, }; -use crate::SerializeValue; use std::collections::hash_map::DefaultHasher; use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet}; @@ -206,8 +206,8 @@ fn test_arc_errors() { #[cfg(feature = "bigdecimal-04")] #[test] fn test_native_errors_bigdecimal_04() { - use bigdecimal_04::num_bigint::BigInt; use bigdecimal_04::BigDecimal; + use bigdecimal_04::num_bigint::BigInt; // Value overflow (type out of representable range) let v = BigDecimal::new(BigInt::from(123), 1i64 << 40); diff --git a/scylla-cql/src/value.rs b/scylla-cql/src/value.rs index 83f86d5385..d0c99a6c0c 100644 --- a/scylla-cql/src/value.rs +++ b/scylla-cql/src/value.rs @@ -7,12 +7,12 @@ use std::result::Result as StdResult; use thiserror::Error; use uuid::Uuid; +use crate::deserialize::DeserializationError; +use crate::deserialize::FrameSlice; use crate::deserialize::value::DeserializeValue; use crate::deserialize::value::{ - mk_deser_err, BuiltinDeserializationErrorKind, MapIterator, UdtIterator, VectorIterator, + BuiltinDeserializationErrorKind, MapIterator, UdtIterator, VectorIterator, mk_deser_err, }; -use crate::deserialize::DeserializationError; -use crate::deserialize::FrameSlice; use crate::frame::response::result::{CollectionType, ColumnType}; use crate::frame::types; use crate::utils::safe_format::IteratorSafeFormatExt; diff --git a/scylla-macros/src/deserialize/row.rs b/scylla-macros/src/deserialize/row.rs index c86d423a49..d104423457 100644 --- a/scylla-macros/src/deserialize/row.rs +++ b/scylla-macros/src/deserialize/row.rs @@ -120,7 +120,9 @@ fn validate_attrs(attrs: &StructAttrs, fields: &[Field]) -> Result<(), darling:: let column_name = field.column_name(); if let Some(other_field) = used_names.get(&column_name) { let other_field_ident = other_field.ident.as_ref().unwrap(); - let msg = format!("the column name `{column_name}` used by this struct field is already used by field `{other_field_ident}`"); + let msg = format!( + "the column name `{column_name}` used by this struct field is already used by field `{other_field_ident}`" + ); let err = darling::Error::custom(msg).with_span(&field.ident); errors.push(err); } else { diff --git a/scylla-macros/src/deserialize/value.rs b/scylla-macros/src/deserialize/value.rs index ceacd7bd2c..bed81ac771 100644 --- a/scylla-macros/src/deserialize/value.rs +++ b/scylla-macros/src/deserialize/value.rs @@ -154,7 +154,9 @@ fn validate_attrs(attrs: &StructAttrs, fields: &[Field]) -> Result<(), darling:: let udt_field_name = field.udt_field_name(); if let Some(other_field) = used_names.get(&udt_field_name) { let other_field_ident = other_field.ident.as_ref().unwrap(); - let msg = format!("the UDT field name `{udt_field_name}` used by this struct field is already used by field `{other_field_ident}`"); + let msg = format!( + "the UDT field name `{udt_field_name}` used by this struct field is already used by field `{other_field_ident}`" + ); let err = darling::Error::custom(msg).with_span(&field.ident); errors.push(err); } else { diff --git a/scylla-macros/src/serialize/row.rs b/scylla-macros/src/serialize/row.rs index 3a673bac5e..ec114f43d0 100644 --- a/scylla-macros/src/serialize/row.rs +++ b/scylla-macros/src/serialize/row.rs @@ -174,7 +174,9 @@ impl Context { let column_name = field.column_name(); if let Some(other_field) = used_names.get(&column_name) { let other_field_ident = &other_field.ident; - let msg = format!("the column / bind marker name `{column_name}` used by this struct field is already used by field `{other_field_ident}`"); + let msg = format!( + "the column / bind marker name `{column_name}` used by this struct field is already used by field `{other_field_ident}`" + ); let err = darling::Error::custom(msg).with_span(&field.ident); errors.push(err); } else { diff --git a/scylla-macros/src/serialize/value.rs b/scylla-macros/src/serialize/value.rs index fc24ffd7f2..47c62c297e 100644 --- a/scylla-macros/src/serialize/value.rs +++ b/scylla-macros/src/serialize/value.rs @@ -190,7 +190,9 @@ impl Context { let field_name = field.field_name(); if let Some(other_field) = used_names.get(&field_name) { let other_field_ident = &other_field.ident; - let msg = format!("the UDT field name `{field_name}` used by this struct field is already used by field `{other_field_ident}`"); + let msg = format!( + "the UDT field name `{field_name}` used by this struct field is already used by field `{other_field_ident}`" + ); let err = darling::Error::custom(msg).with_span(&field.ident); errors.push(err); } else { diff --git a/scylla-proxy/src/actions.rs b/scylla-proxy/src/actions.rs index 6a6eacff03..dd386bb9ce 100644 --- a/scylla-proxy/src/actions.rs +++ b/scylla-proxy/src/actions.rs @@ -8,8 +8,8 @@ use tokio::sync::mpsc; use crate::setup_tracing; use crate::{ - frame::{FrameOpcode, FrameParams, RequestFrame, RequestOpcode, ResponseFrame, ResponseOpcode}, TargetShard, + frame::{FrameOpcode, FrameParams, RequestFrame, RequestOpcode, ResponseFrame, ResponseOpcode}, }; use scylla_cql::frame::response::error::DbError; @@ -104,9 +104,7 @@ impl Condition { }) }) .unwrap_or(false), - Condition::RandomWithProbability(probability) => { - rand::rng().random_bool(*probability) - } + Condition::RandomWithProbability(probability) => rand::rng().random_bool(*probability), Condition::TrueForLimitedTimes(times) => { let val = *times > 0; @@ -114,9 +112,9 @@ impl Condition { *times -= 1; } val - }, + } - Condition::ConnectionRegisteredAnyEvent => ctx.connection_has_events + Condition::ConnectionRegisteredAnyEvent => ctx.connection_has_events, } } @@ -438,8 +436,8 @@ impl RequestReaction { pub mod example_db_errors { use bytes::Bytes; use scylla_cql::{ - frame::response::error::{DbError, WriteType}, Consistency, + frame::response::error::{DbError, WriteType}, }; pub fn syntax_error() -> DbError { diff --git a/scylla-proxy/src/lib.rs b/scylla-proxy/src/lib.rs index c397e4ce73..622c366d7c 100644 --- a/scylla-proxy/src/lib.rs +++ b/scylla-proxy/src/lib.rs @@ -6,8 +6,8 @@ mod proxy; pub type TargetShard = u16; pub use actions::{ - example_db_errors, Action, Condition, Reaction, RequestReaction, RequestRule, ResponseReaction, - ResponseRule, + Action, Condition, Reaction, RequestReaction, RequestRule, ResponseReaction, ResponseRule, + example_db_errors, }; pub use errors::{DoorkeeperError, ProxyError, WorkerError}; pub use frame::{RequestFrame, RequestOpcode, ResponseFrame, ResponseOpcode}; @@ -17,9 +17,9 @@ pub use proxy::get_exclusive_local_address; #[cfg(test)] pub(crate) fn setup_tracing() { + use tracing_subscriber::Layer; use tracing_subscriber::layer::SubscriberExt; use tracing_subscriber::util::SubscriberInitExt; - use tracing_subscriber::Layer; let testing_layer = tracing_subscriber::fmt::layer() .with_test_writer() diff --git a/scylla-proxy/src/proxy.rs b/scylla-proxy/src/proxy.rs index 9cbd8f2216..09e87e1383 100644 --- a/scylla-proxy/src/proxy.rs +++ b/scylla-proxy/src/proxy.rs @@ -1,7 +1,7 @@ use crate::actions::{EvaluationContext, RequestRule, ResponseRule}; use crate::errors::{DoorkeeperError, ProxyError, WorkerError}; use crate::frame::{ - self, read_response_frame, write_frame, FrameOpcode, FrameParams, RequestFrame, ResponseFrame, + self, FrameOpcode, FrameParams, RequestFrame, ResponseFrame, read_response_frame, write_frame, }; use crate::{RequestOpcode, TargetShard}; use bytes::Bytes; @@ -877,9 +877,9 @@ mod compression { CqlRequestSerializationError, FrameBodyExtensionsParseError, }; use scylla_cql::frame::request::{ - options, DeserializableRequest as _, RequestDeserializationError, Startup, + DeserializableRequest as _, RequestDeserializationError, Startup, options, }; - use scylla_cql::frame::{compress_append, decompress, flag, Compression}; + use scylla_cql::frame::{Compression, compress_append, decompress, flag}; use tracing::{error, warn}; #[derive(Debug, thiserror::Error)] @@ -1479,10 +1479,10 @@ mod tests { use super::compression::no_compression; use super::*; use crate::errors::ReadFrameError; - use crate::frame::{read_frame, read_request_frame, FrameType}; + use crate::frame::{FrameType, read_frame, read_request_frame}; use crate::proxy::compression::with_compression; use crate::{ - setup_tracing, Condition, Reaction as _, RequestReaction, ResponseOpcode, ResponseReaction, + Condition, Reaction as _, RequestReaction, ResponseOpcode, ResponseReaction, setup_tracing, }; use assert_matches::assert_matches; use bytes::{BufMut, BytesMut}; @@ -1491,7 +1491,7 @@ mod tests { use scylla_cql::frame::request::options; use scylla_cql::frame::request::{SerializableRequest as _, Startup}; use scylla_cql::frame::types::write_string_multimap; - use scylla_cql::frame::{flag, Compression}; + use scylla_cql::frame::{Compression, flag}; use std::collections::HashMap; use std::mem; use std::str::FromStr; diff --git a/scylla/benches/benchmark.rs b/scylla/benches/benchmark.rs index b9f6d0bbd0..c27c29baa1 100644 --- a/scylla/benches/benchmark.rs +++ b/scylla/benches/benchmark.rs @@ -1,6 +1,6 @@ #![allow(missing_docs)] -use criterion::{criterion_group, criterion_main, Criterion}; +use criterion::{Criterion, criterion_group, criterion_main}; use bytes::BytesMut; use scylla::internal_testing::calculate_token_for_partition_key; diff --git a/scylla/src/client/caching_session.rs b/scylla/src/client/caching_session.rs index 457b430a23..34b94d1f58 100644 --- a/scylla/src/client/caching_session.rs +++ b/scylla/src/client/caching_session.rs @@ -431,7 +431,7 @@ mod tests { use crate::statement::prepared::PreparedStatement; use crate::statement::unprepared::Statement; use crate::test_utils::{ - create_new_session_builder, scylla_supports_tablets, setup_tracing, PerformDDL, + PerformDDL, create_new_session_builder, scylla_supports_tablets, setup_tracing, }; use crate::utils::test_utils::unique_keyspace_name; use crate::value::Row; diff --git a/scylla/src/client/execution_profile.rs b/scylla/src/client/execution_profile.rs index 4154815637..9b428c0227 100644 --- a/scylla/src/client/execution_profile.rs +++ b/scylla/src/client/execution_profile.rs @@ -165,7 +165,7 @@ use std::{fmt::Debug, sync::Arc, time::Duration}; use arc_swap::ArcSwap; -use scylla_cql::{frame::types::SerialConsistency, Consistency}; +use scylla_cql::{Consistency, frame::types::SerialConsistency}; use crate::policies::load_balancing::LoadBalancingPolicy; use crate::policies::retry::RetryPolicy; @@ -176,8 +176,8 @@ pub(crate) mod defaults { use crate::policies::load_balancing::{self, LoadBalancingPolicy}; use crate::policies::retry::{DefaultRetryPolicy, RetryPolicy}; use crate::policies::speculative_execution::SpeculativeExecutionPolicy; - use scylla_cql::frame::types::SerialConsistency; use scylla_cql::Consistency; + use scylla_cql::frame::types::SerialConsistency; use std::sync::Arc; use std::time::Duration; pub(crate) fn consistency() -> Consistency { @@ -507,12 +507,12 @@ pub struct ExecutionProfileHandle(Arc<(ArcSwap, Option Arc { - self.0 .0.load_full() + self.0.0.load_full() } /// Creates a builder having all options set to the same as set in the ExecutionProfile pointed by this handle. pub fn pointee_to_builder(&self) -> ExecutionProfileBuilder { - self.0 .0.load().to_builder() + self.0.0.load().to_builder() } /// Returns execution profile pointed by this handle. @@ -523,6 +523,6 @@ impl ExecutionProfileHandle { /// Makes the handle point to a new execution profile. /// All entities (statements/Session) holding this handle will reflect the change. pub fn map_to_another_profile(&mut self, profile: ExecutionProfile) { - self.0 .0.store(profile.0) + self.0.0.store(profile.0) } } diff --git a/scylla/src/client/pager.rs b/scylla/src/client/pager.rs index 6fd5c9d7a5..722f1a287b 100644 --- a/scylla/src/client/pager.rs +++ b/scylla/src/client/pager.rs @@ -10,16 +10,16 @@ use std::sync::Arc; use std::task::{Context, Poll}; use futures::Stream; +use scylla_cql::Consistency; use scylla_cql::deserialize::result::RawRowLendingIterator; use scylla_cql::deserialize::row::{ColumnIterator, DeserializeRow}; use scylla_cql::deserialize::{DeserializationError, TypeCheckError}; use scylla_cql::frame::frame_errors::ResultMetadataAndRowsCountParseError; use scylla_cql::frame::request::query::PagingState; -use scylla_cql::frame::response::result::RawMetadataAndRawRows; use scylla_cql::frame::response::NonErrorResponse; +use scylla_cql::frame::response::result::RawMetadataAndRawRows; use scylla_cql::frame::types::SerialConsistency; use scylla_cql::serialize::row::SerializedValues; -use scylla_cql::Consistency; use std::result::Result; use thiserror::Error; use tokio::sync::mpsc; @@ -40,7 +40,7 @@ use crate::response::query_result::ColumnSpecs; use crate::response::{NonErrorQueryResponse, QueryResponse}; use crate::statement::prepared::{PartitionKeyError, PreparedStatement}; use crate::statement::unprepared::Statement; -use tracing::{trace, trace_span, warn, Instrument}; +use tracing::{Instrument, trace, trace_span, warn}; use uuid::Uuid; // Like std::task::ready!, but handles the whole stack of Poll>>. diff --git a/scylla/src/client/session.rs b/scylla/src/client/session.rs index 6961b7e193..611826752d 100644 --- a/scylla/src/client/session.rs +++ b/scylla/src/client/session.rs @@ -57,7 +57,7 @@ use std::time::Duration; use tokio::time::timeout; #[cfg(feature = "unstable-cloud")] use tracing::warn; -use tracing::{debug, error, trace, trace_span, Instrument}; +use tracing::{Instrument, debug, error, trace, trace_span}; use uuid::Uuid; pub(crate) const TABLET_CHANNEL_SIZE: usize = 8192; @@ -1018,7 +1018,9 @@ impl Session { .query(statement, values, None, PagingState::start()) .await?; if !paging_state_response.finished() { - error!("Unpaged unprepared query returned a non-empty paging state! This is a driver-side or server-side bug."); + error!( + "Unpaged unprepared query returned a non-empty paging state! This is a driver-side or server-side bug." + ); return Err(ExecutionError::LastAttemptError( RequestAttemptError::NonfinishedPagingState, )); @@ -1390,7 +1392,9 @@ impl Session { .execute(prepared, &serialized_values, None, PagingState::start()) .await?; if !paging_state.finished() { - error!("Unpaged prepared query returned a non-empty paging state! This is a driver-side or server-side bug."); + error!( + "Unpaged prepared query returned a non-empty paging state! This is a driver-side or server-side bug." + ); return Err(ExecutionError::LastAttemptError( RequestAttemptError::NonfinishedPagingState, )); @@ -2176,7 +2180,7 @@ impl Session { RetryDecision::DontRetry => break 'nodes_in_plan, RetryDecision::IgnoreWriteError => { - return Some(Ok((RunRequestResult::IgnoredWriteError, coordinator))) + return Some(Ok((RunRequestResult::IgnoredWriteError, coordinator))); } }; } @@ -2284,7 +2288,7 @@ impl Session { Some((_, Ok(SchemaNodeResult::BrokenConnection(e)))) => { return Err(SchemaAgreementError::RequestError( RequestAttemptError::BrokenConnectionError(e.clone()), - )) + )); } Some((_, Err(e))) => return Err(e.clone()), None => return Err(SchemaAgreementError::RequiredHostAbsent(required_node)), diff --git a/scylla/src/client/session_builder.rs b/scylla/src/client/session_builder.rs index 311adee646..af55e4955a 100644 --- a/scylla/src/client/session_builder.rs +++ b/scylla/src/client/session_builder.rs @@ -1191,12 +1191,12 @@ impl Default for SessionBuilder { #[cfg(test)] mod tests { - use scylla_cql::frame::types::SerialConsistency; use scylla_cql::Consistency; + use scylla_cql::frame::types::SerialConsistency; use super::super::Compression; use super::SessionBuilder; - use crate::client::execution_profile::{defaults, ExecutionProfile}; + use crate::client::execution_profile::{ExecutionProfile, defaults}; use crate::cluster::node::KnownNode; use crate::test_utils::setup_tracing; use std::net::{IpAddr, Ipv4Addr, SocketAddr}; diff --git a/scylla/src/cloud/config.rs b/scylla/src/cloud/config.rs index 153f677f19..85c9a5ae7e 100644 --- a/scylla/src/cloud/config.rs +++ b/scylla/src/cloud/config.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use std::{collections::HashMap, io}; use async_trait::async_trait; -use scylla_cql::{frame::types::SerialConsistency, Consistency}; +use scylla_cql::{Consistency, frame::types::SerialConsistency}; use thiserror::Error; use tracing::warn; use uuid::Uuid; @@ -90,8 +90,10 @@ impl CloudConfig { proxy_address: SocketAddr, ) -> Result, TlsError> { let Some(datacenter) = dc.and_then(|dc| self.get_datacenters().get(dc)) else { - warn!("Datacenter {:?} of node {:?} with addr {} not described in cloud config. Proceeding without setting SNI for the node, which will most probably result in nonworking connections,.", - dc, host_id, proxy_address); + warn!( + "Datacenter {:?} of node {:?} with addr {} not described in cloud config. Proceeding without setting SNI for the node, which will most probably result in nonworking connections,.", + dc, host_id, proxy_address + ); // FIXME: Consider returning error here. return Ok(None); }; @@ -125,7 +127,8 @@ impl AddressTranslator for CloudConfig { } = *untranslated_peer; let Some(dc) = datacenter.as_deref() else { - warn!( // FIXME: perhaps error! would fit here better? + warn!( + // FIXME: perhaps error! would fit here better? "Datacenter for node {} is empty in the Metadata fetched from the Cloud cluster; ; therefore address \ broadcast by the node was left as address to open connection to.", host_id @@ -135,7 +138,8 @@ impl AddressTranslator for CloudConfig { }; let Some(dc_config) = self.get_datacenters().get(dc) else { - warn!( // FIXME: perhaps error! would fit here better? + warn!( + // FIXME: perhaps error! would fit here better? "Datacenter {} that node {} resides in not found in the Cloud config; ; therefore address \ broadcast by the node was left as address to open connection to.", dc, host_id @@ -360,8 +364,8 @@ pub(crate) struct Context { mod deserialize { use super::{CloudConfigError, CloudTlsProvider, TlsCert, TlsError, TlsInfo}; - use base64::{engine::general_purpose, Engine as _}; - use scylla_cql::{frame::types::SerialConsistency, Consistency}; + use base64::{Engine as _, engine::general_purpose}; + use scylla_cql::{Consistency, frame::types::SerialConsistency}; use std::{collections::HashMap, fs::File, io::Read, path::Path}; use serde::Deserialize; @@ -781,17 +785,17 @@ mod deserialize { #[cfg(test)] mod tests { - use crate::cloud::config::deserialize::Parameters; - use crate::cloud::config::TlsInfo; use crate::cloud::CloudTlsProvider; + use crate::cloud::config::TlsInfo; + use crate::cloud::config::deserialize::Parameters; use crate::test_utils::setup_tracing; use super::super::CloudConfig; use super::RawCloudConfig; use assert_matches::assert_matches; - use base64::{engine::general_purpose, Engine as _}; - use scylla_cql::frame::types::SerialConsistency; + use base64::{Engine as _, engine::general_purpose}; use scylla_cql::Consistency; + use scylla_cql::frame::types::SerialConsistency; impl Clone for super::Datacenter { fn clone(&self) -> Self { diff --git a/scylla/src/cluster/control_connection.rs b/scylla/src/cluster/control_connection.rs index b4538d70e6..f1f308f73b 100644 --- a/scylla/src/cluster/control_connection.rs +++ b/scylla/src/cluster/control_connection.rs @@ -11,8 +11,8 @@ use scylla_cql::serialize::row::SerializedValues; use crate::client::pager::QueryPager; use crate::errors::{NextRowError, RequestAttemptError}; use crate::network::Connection; -use crate::statement::prepared::PreparedStatement; use crate::statement::Statement; +use crate::statement::prepared::PreparedStatement; /// The single connection used to fetch metadata and receive events from the cluster. pub(super) struct ControlConnection { diff --git a/scylla/src/cluster/metadata.rs b/scylla/src/cluster/metadata.rs index b99c90202a..52d2c84309 100644 --- a/scylla/src/cluster/metadata.rs +++ b/scylla/src/cluster/metadata.rs @@ -16,6 +16,7 @@ //! - [CollectionType], //! +use crate::DeserializeRow; use crate::client::pager::{NextPageError, NextRowError, QueryPager}; use crate::cluster::node::resolve_contact_points; use crate::deserialize::DeserializeOwnedRow; @@ -30,14 +31,13 @@ use crate::policies::host_filter::HostFilter; use crate::routing::Token; use crate::statement::unprepared::Statement; use crate::utils::safe_format::IteratorSafeFormatExt; -use crate::DeserializeRow; use scylla_cql::utils::parse::{ParseErrorCause, ParseResult, ParserState}; +use futures::Stream; use futures::future::{self, FutureExt}; use futures::stream::{self, StreamExt, TryStreamExt}; -use futures::Stream; use rand::seq::{IndexedRandom, SliceRandom}; -use rand::{rng, Rng}; +use rand::{Rng, rng}; use scylla_cql::frame::response::result::{ColumnSpec, TableSpec}; use std::borrow::BorrowMut; use std::cell::Cell; @@ -307,7 +307,7 @@ impl PreColumnType { return Err(MissingUserDefinedType { name, keyspace: keyspace_name.clone(), - }) + }); } }; Ok(ColumnType::UserDefinedType { frozen, definition }) @@ -586,7 +586,9 @@ impl MetadataReader { if !initial { // If no known peer is reachable, try falling back to initial contact points, in hope that // there are some hostnames there which will resolve to reachable new addresses. - warn!("Failed to establish control connection and fetch metadata on all known peers. Falling back to initial contact points."); + warn!( + "Failed to establish control connection and fetch metadata on all known peers. Falling back to initial contact points." + ); let (initial_peers, _hostnames) = resolve_contact_points(&self.initial_known_nodes).await; result = self @@ -853,8 +855,9 @@ impl ControlConnection { }) .and_then(|row_result| future::ok((NodeInfoSource::Peer, row_result))); - let mut local_query = - Statement::new("select host_id, rpc_address, data_center, rack, tokens from system.local WHERE key='local'"); + let mut local_query = Statement::new( + "select host_id, rpc_address, data_center, rack, tokens from system.local WHERE key='local'", + ); local_query.set_page_size(METADATA_QUERY_PAGE_SIZE); let local_query_stream = self .query_iter(local_query) @@ -915,7 +918,13 @@ impl ControlConnection { let host_id = match host_id { Some(host_id) => host_id, None => { - warn!("{} (untranslated ip: {}, dc: {:?}, rack: {:?}) has Host ID set to null; skipping node.", source.describe(), untranslated_ip_addr, datacenter, rack); + warn!( + "{} (untranslated ip: {}, dc: {:?}, rack: {:?}) has Host ID set to null; skipping node.", + source.describe(), + untranslated_ip_addr, + datacenter, + rack + ); return None; } }; @@ -951,7 +960,10 @@ impl ControlConnection { // in order for it to work with non-standard token sizes. // Also, we could implement support for Cassandra's other standard partitioners // like RandomPartitioner or ByteOrderedPartitioner. - trace!("Couldn't parse tokens as 64-bit integers: {}, proceeding with a dummy token. If you're using a partitioner with different token size, consider migrating to murmur3", e); + trace!( + "Couldn't parse tokens as 64-bit integers: {}, proceeding with a dummy token. If you're using a partitioner with different token size, consider migrating to murmur3", + e + ); vec![Token::new(rand::rng().random::())] } }; @@ -1083,7 +1095,7 @@ impl ControlConnection { return Ok(( keyspace_name, Err(SingleKeyspaceMetadataError::MissingUDT(e)), - )) + )); } }; @@ -1325,7 +1337,7 @@ fn topo_sort_udts(udts: &mut Vec) -> Result<(), UdtM mod toposort_tests { use crate::test_utils::setup_tracing; - use super::{topo_sort_udts, UdtRow, UdtRowWithParsedFieldTypes}; + use super::{UdtRow, UdtRowWithParsedFieldTypes, topo_sort_udts}; const KEYSPACE1: &str = "KEYSPACE1"; const KEYSPACE2: &str = "KEYSPACE2"; diff --git a/scylla/src/cluster/mod.rs b/scylla/src/cluster/mod.rs index 30d191a903..8c759a6bf7 100644 --- a/scylla/src/cluster/mod.rs +++ b/scylla/src/cluster/mod.rs @@ -16,7 +16,7 @@ // from the cluster. mod worker; -pub(crate) use worker::{use_keyspace_result, Cluster, ClusterNeatDebug}; +pub(crate) use worker::{Cluster, ClusterNeatDebug, use_keyspace_result}; mod state; pub use state::ClusterState; diff --git a/scylla/src/cluster/state.rs b/scylla/src/cluster/state.rs index 1ec2222553..0a8c8e0bce 100644 --- a/scylla/src/cluster/state.rs +++ b/scylla/src/cluster/state.rs @@ -3,9 +3,9 @@ use crate::network::{Connection, PoolConfig, VerifiedKeyspaceName}; #[cfg(feature = "metrics")] use crate::observability::metrics::Metrics; use crate::policies::host_filter::HostFilter; -use crate::routing::locator::tablets::{RawTablet, Tablet, TabletsInfo}; use crate::routing::locator::ReplicaLocator; -use crate::routing::partitioner::{calculate_token_for_partition_key, PartitionerName}; +use crate::routing::locator::tablets::{RawTablet, Tablet, TabletsInfo}; +use crate::routing::partitioner::{PartitionerName, calculate_token_for_partition_key}; use crate::routing::{Shard, Token}; use crate::utils::safe_format::IteratorSafeFormatExt; @@ -427,9 +427,15 @@ impl ClusterState { let tablet = match Tablet::from_raw_tablet(raw_tablet, replica_translator) { Ok(t) => t, Err((t, f)) => { - debug!("Nodes ({}) that are replicas for a tablet {{ks: {}, table: {}, range: [{}. {}]}} not present in current ClusterState.known_peers. \ + debug!( + "Nodes ({}) that are replicas for a tablet {{ks: {}, table: {}, range: [{}. {}]}} not present in current ClusterState.known_peers. \ Skipping these replicas until topology refresh", - f.iter().safe_format(", "), table.ks_name(), table.table_name(), t.range().0.value(), t.range().1.value()); + f.iter().safe_format(", "), + table.ks_name(), + table.table_name(), + t.range().0.value(), + t.range().1.value() + ); t } }; diff --git a/scylla/src/cluster/worker.rs b/scylla/src/cluster/worker.rs index edf2ea316f..1fdcc1566b 100644 --- a/scylla/src/cluster/worker.rs +++ b/scylla/src/cluster/worker.rs @@ -9,7 +9,7 @@ use crate::routing::locator::tablets::{RawTablet, TabletsInfo}; use arc_swap::ArcSwap; use futures::future::join_all; -use futures::{future::RemoteHandle, FutureExt}; +use futures::{FutureExt, future::RemoteHandle}; use scylla_cql::frame::response::result::TableSpec; use std::collections::HashMap; use std::sync::Arc; diff --git a/scylla/src/errors.rs b/scylla/src/errors.rs index 2035f81ed2..95a0e4fa81 100644 --- a/scylla/src/errors.rs +++ b/scylla/src/errors.rs @@ -35,8 +35,8 @@ pub use scylla_cql::frame::frame_errors::{ FrameHeaderParseError, }; pub use scylla_cql::frame::request::CqlRequestKind; -pub use scylla_cql::frame::response::error::{DbError, OperationType, WriteType}; pub use scylla_cql::frame::response::CqlResponseKind; +pub use scylla_cql::frame::response::error::{DbError, OperationType, WriteType}; pub use scylla_cql::serialize::SerializationError; /// Error that occurred during request execution @@ -104,7 +104,9 @@ pub enum PrepareError { ConnectionPoolError(#[from] ConnectionPoolError), /// Failed to prepare statement on every connection from the pool. - #[error("Preparation failed on every connection from the selected pool. First attempt error: {first_attempt}")] + #[error( + "Preparation failed on every connection from the selected pool. First attempt error: {first_attempt}" + )] AllAttemptsFailed { /// Error that the first attempt failed with. first_attempt: RequestAttemptError, @@ -172,7 +174,9 @@ pub enum UseKeyspaceError { RequestError(#[from] RequestAttemptError), /// Keyspace name mismatch. - #[error("Keyspace name mismatch; expected: {expected_keyspace_name_lowercase}, received: {result_keyspace_name_lowercase}")] + #[error( + "Keyspace name mismatch; expected: {expected_keyspace_name_lowercase}, received: {result_keyspace_name_lowercase}" + )] KeyspaceNameMismatch { /// Expected keyspace name, in lowercase. expected_keyspace_name_lowercase: String, @@ -464,11 +468,15 @@ pub enum BadQuery { SerializationError(#[from] SerializationError), /// Serialized values are too long to compute partition key. - #[error("Serialized values are too long to compute partition key! Length: {0}, Max allowed length: {1}")] + #[error( + "Serialized values are too long to compute partition key! Length: {0}, Max allowed length: {1}" + )] ValuesTooLongForKey(usize, usize), /// Too many statements in the batch statement. - #[error("Number of statements in Batch Statement supplied is {0} which has exceeded the max value of 65,535")] + #[error( + "Number of statements in Batch Statement supplied is {0} which has exceeded the max value of 65,535" + )] TooManyQueriesInBatchStatement(usize), } @@ -481,11 +489,15 @@ pub enum BadKeyspaceName { Empty, /// Keyspace name too long, must be up to 48 characters - #[error("Keyspace name too long, must be up to 48 characters, found {1} characters. Bad keyspace name: '{0}'")] + #[error( + "Keyspace name too long, must be up to 48 characters, found {1} characters. Bad keyspace name: '{0}'" + )] TooLong(String, usize), /// Illegal character - only alphanumeric and underscores allowed. - #[error("Illegal character found: '{1}', only alphanumeric and underscores allowed. Bad keyspace name: '{0}'")] + #[error( + "Illegal character found: '{1}', only alphanumeric and underscores allowed. Bad keyspace name: '{0}'" + )] IllegalCharacter(String, char), } @@ -661,7 +673,9 @@ pub enum ConnectionSetupRequestErrorKind { /// User did not provide authentication while the cluster requires it. /// See [`SessionBuilder::user`](crate::client::session_builder::SessionBuilder::user) /// and/or [`SessionBuilder::authenticator_provider`](crate::client::session_builder::SessionBuilder::authenticator_provider). - #[error("Authentication is required. You can use SessionBuilder::user(\"user\", \"pass\") to provide credentials or SessionBuilder::authenticator_provider to provide custom authenticator")] + #[error( + "Authentication is required. You can use SessionBuilder::user(\"user\", \"pass\") to provide credentials or SessionBuilder::authenticator_provider to provide custom authenticator" + )] MissingAuthentication, } @@ -773,7 +787,9 @@ pub enum CqlEventHandlingError { /// Driver failed to send event data between the internal tasks. /// It implies that connection was broken for some reason. - #[error("Failed to send event info via channel. The channel is probably closed, which is caused by connection being broken")] + #[error( + "Failed to send event info via channel. The channel is probably closed, which is caused by connection being broken" + )] SendError, } @@ -791,11 +807,11 @@ pub enum CqlEventHandlingError { pub enum RequestError { /// Load balancing policy returned an empty plan. #[error( - "Load balancing policy returned an empty plan.\ + "Load balancing policy returned an empty plan.\ First thing to investigate should be the logic of custom LBP implementation.\ If you think that your LBP implementation is correct, or you make use of `DefaultPolicy`,\ then this is most probably a driver bug!" - )] + )] EmptyPlan, /// Selected node's connection pool is in invalid state. @@ -900,7 +916,9 @@ pub enum RequestAttemptError { RepreparedIdMissingInBatch, /// A result with nonfinished paging state received for unpaged query. - #[error("Unpaged query returned a non-empty paging state! This is a driver-side or server-side bug.")] + #[error( + "Unpaged query returned a non-empty paging state! This is a driver-side or server-side bug." + )] NonfinishedPagingState, } diff --git a/scylla/src/lib.rs b/scylla/src/lib.rs index 48f2998727..219d023742 100644 --- a/scylla/src/lib.rs +++ b/scylla/src/lib.rs @@ -115,10 +115,10 @@ pub mod value { pub mod frame { //! Abstractions of the CQL wire protocol. - pub use scylla_cql::frame::{frame_errors, Authenticator, Compression}; + pub use scylla_cql::frame::{Authenticator, Compression, frame_errors}; pub(crate) use scylla_cql::frame::{ - parse_response_body_extensions, protocol_features, read_response_frame, request, - server_event_type, FrameParams, SerializedRequest, + FrameParams, SerializedRequest, parse_response_body_extensions, protocol_features, + read_response_frame, request, server_event_type, }; pub mod types { @@ -264,8 +264,8 @@ pub(crate) use utils::test_utils; pub mod internal_testing { use scylla_cql::serialize::row::SerializedValues; - use crate::routing::partitioner::PartitionerName; use crate::routing::Token; + use crate::routing::partitioner::PartitionerName; use crate::statement::prepared::TokenCalculationError; pub fn calculate_token_for_partition_key( diff --git a/scylla/src/network/connection.rs b/scylla/src/network/connection.rs index 55a2eb4061..a6d5eb76a9 100644 --- a/scylla/src/network/connection.rs +++ b/scylla/src/network/connection.rs @@ -1,10 +1,10 @@ use super::tls::{TlsConfig, TlsProvider}; use crate::authentication::AuthenticatorProvider; -use crate::client::pager::{NextRowError, QueryPager}; use crate::client::Compression; use crate::client::SelfIdentity; -use crate::cluster::metadata::{PeerEndpoint, UntranslatedEndpoint}; +use crate::client::pager::{NextRowError, QueryPager}; use crate::cluster::NodeAddr; +use crate::cluster::metadata::{PeerEndpoint, UntranslatedEndpoint}; use crate::errors::{ BadKeyspaceName, BrokenConnectionError, BrokenConnectionErrorKind, ConnectionError, ConnectionSetupRequestError, ConnectionSetupRequestErrorKind, CqlEventHandlingError, DbError, @@ -13,11 +13,10 @@ use crate::errors::{ }; use crate::frame::protocol_features::ProtocolFeatures; use crate::frame::{ - self, - request::{self, batch, execute, query, register, SerializableRequest}, - response::{event::Event, result, Response, ResponseOpcode}, + self, FrameParams, SerializedRequest, + request::{self, SerializableRequest, batch, execute, query, register}, + response::{Response, ResponseOpcode, event::Event, result}, server_event_type::EventType, - FrameParams, SerializedRequest, }; use crate::policies::address_translator::{AddressTranslator, UntranslatedPeer}; use crate::policies::timestamp_generator::TimestampGenerator; @@ -32,13 +31,13 @@ use crate::statement::prepared::PreparedStatement; use crate::statement::unprepared::Statement; use crate::statement::{Consistency, PageSize}; use bytes::Bytes; -use futures::{future::RemoteHandle, FutureExt}; +use futures::{FutureExt, future::RemoteHandle}; use scylla_cql::frame::frame_errors::CqlResponseParseError; -use scylla_cql::frame::request::options::{self, Options}; use scylla_cql::frame::request::CqlRequestKind; +use scylla_cql::frame::request::options::{self, Options}; +use scylla_cql::frame::response::Error; use scylla_cql::frame::response::authenticate::Authenticate; use scylla_cql::frame::response::result::{ResultMetadata, TableSpec}; -use scylla_cql::frame::response::Error; use scylla_cql::frame::response::{self, error}; use scylla_cql::frame::types::SerialConsistency; use scylla_cql::serialize::batch::{BatchValues, BatchValuesIterator}; @@ -50,15 +49,15 @@ use std::collections::{BTreeSet, HashMap, HashSet}; use std::convert::TryFrom; use std::net::{IpAddr, SocketAddr}; use std::num::NonZeroU64; -use std::sync::atomic::AtomicU64; use std::sync::Arc; use std::sync::Mutex as StdMutex; +use std::sync::atomic::AtomicU64; use std::time::Duration; use std::{ cmp::Ordering, net::{Ipv4Addr, Ipv6Addr}, }; -use tokio::io::{split, AsyncRead, AsyncWrite, AsyncWriteExt, BufReader, BufWriter}; +use tokio::io::{AsyncRead, AsyncWrite, AsyncWriteExt, BufReader, BufWriter, split}; use tokio::net::{TcpSocket, TcpStream}; use tokio::sync::{mpsc, oneshot}; use tokio::time::Instant; @@ -552,12 +551,12 @@ impl Connection { Response::Ready => NonErrorStartupResponse::Ready, Response::Authenticate(auth) => NonErrorStartupResponse::Authenticate(auth), Response::Error(Error { error, reason }) => { - return Err(err(ConnectionSetupRequestErrorKind::DbError(error, reason))) + return Err(err(ConnectionSetupRequestErrorKind::DbError(error, reason))); } _ => { return Err(err(ConnectionSetupRequestErrorKind::UnexpectedResponse( r.response.to_response_kind(), - ))) + ))); } }, Err(e) => match e { @@ -567,18 +566,18 @@ impl Connection { // Parsing of READY response cannot fail, since its body is empty. // Remaining valid responses are AUTHENTICATE and ERROR. CqlResponseParseError::CqlAuthenticateParseError(e) => { - return Err(err(e.into())) + return Err(err(e.into())); } CqlResponseParseError::CqlErrorParseError(e) => return Err(err(e.into())), _ => { return Err(err(ConnectionSetupRequestErrorKind::UnexpectedResponse( e.to_response_kind(), - ))) + ))); } }, InternalRequestError::BrokenConnection(e) => return Err(err(e.into())), InternalRequestError::UnableToAllocStreamId => { - return Err(err(ConnectionSetupRequestErrorKind::UnableToAllocStreamId)) + return Err(err(ConnectionSetupRequestErrorKind::UnableToAllocStreamId)); } }, }; @@ -600,12 +599,12 @@ impl Connection { Ok(r) => match r.response { Response::Supported(supported) => supported, Response::Error(Error { error, reason }) => { - return Err(err(ConnectionSetupRequestErrorKind::DbError(error, reason))) + return Err(err(ConnectionSetupRequestErrorKind::DbError(error, reason))); } _ => { return Err(err(ConnectionSetupRequestErrorKind::UnexpectedResponse( r.response.to_response_kind(), - ))) + ))); } }, Err(e) => match e { @@ -617,12 +616,12 @@ impl Connection { _ => { return Err(err(ConnectionSetupRequestErrorKind::UnexpectedResponse( e.to_response_kind(), - ))) + ))); } }, InternalRequestError::BrokenConnection(e) => return Err(err(e.into())), InternalRequestError::UnableToAllocStreamId => { - return Err(err(ConnectionSetupRequestErrorKind::UnableToAllocStreamId)) + return Err(err(ConnectionSetupRequestErrorKind::UnableToAllocStreamId)); } }, }; @@ -775,12 +774,12 @@ impl Connection { NonErrorAuthResponse::AuthChallenge(auth_challenge) } Response::Error(Error { error, reason }) => { - return Err(err(ConnectionSetupRequestErrorKind::DbError(error, reason))) + return Err(err(ConnectionSetupRequestErrorKind::DbError(error, reason))); } _ => { return Err(err(ConnectionSetupRequestErrorKind::UnexpectedResponse( r.response.to_response_kind(), - ))) + ))); } }, Err(e) => match e { @@ -788,21 +787,21 @@ impl Connection { InternalRequestError::BodyExtensionsParseError(e) => return Err(err(e.into())), InternalRequestError::CqlResponseParseError(e) => match e { CqlResponseParseError::CqlAuthSuccessParseError(e) => { - return Err(err(e.into())) + return Err(err(e.into())); } CqlResponseParseError::CqlAuthChallengeParseError(e) => { - return Err(err(e.into())) + return Err(err(e.into())); } CqlResponseParseError::CqlErrorParseError(e) => return Err(err(e.into())), _ => { return Err(err(ConnectionSetupRequestErrorKind::UnexpectedResponse( e.to_response_kind(), - ))) + ))); } }, InternalRequestError::BrokenConnection(e) => return Err(err(e.into())), InternalRequestError::UnableToAllocStreamId => { - return Err(err(ConnectionSetupRequestErrorKind::UnableToAllocStreamId)) + return Err(err(ConnectionSetupRequestErrorKind::UnableToAllocStreamId)); } }, }; @@ -958,7 +957,10 @@ impl Connection { error: DbError::Unprepared { statement_id }, .. }) => { - debug!("Connection::execute: Got DbError::Unprepared - repreparing statement with id {:?}", statement_id); + debug!( + "Connection::execute: Got DbError::Unprepared - repreparing statement with id {:?}", + statement_id + ); // Repreparation of a statement is needed self.reprepare(prepared_statement.get_statement(), prepared_statement) .await?; @@ -1069,7 +1071,10 @@ impl Connection { return match query_response.response { Response::Error(err) => match err.error { DbError::Unprepared { statement_id } => { - debug!("Connection::batch: got DbError::Unprepared - repreparing statement with id {:?}", statement_id); + debug!( + "Connection::batch: got DbError::Unprepared - repreparing statement with id {:?}", + statement_id + ); let prepared_statement = batch.statements.iter().find_map(|s| match s { BatchStatement::PreparedStatement(s) if *s.get_id() == statement_id => { Some(s) @@ -1740,7 +1745,7 @@ impl Connection { _ => { return Err(CqlEventHandlingError::UnexpectedResponse( e.to_response_kind(), - )) + )); } }, }, @@ -1874,7 +1879,8 @@ pub(crate) async fn open_connection( Err(e) => { tracing::error!( "[{}] Error while parsing sharding information: {}. Proceeding with no sharding info.", - addr, e + addr, + e ); None } @@ -2040,9 +2046,9 @@ impl OrphanageTracker { self.by_orphaning_times .range(..(minimal_age, i16::MAX)) .count() // This has linear time complexity, but in terms of - // the number of old orphans. Healthy connection - one - // that does not have old orphaned stream ids, will - // calculate this function quickly. + // the number of old orphans. Healthy connection - one + // that does not have old orphaned stream ids, will + // calculate this function quickly. } } @@ -2214,7 +2220,7 @@ impl VerifiedKeyspaceName { return Err(BadKeyspaceName::IllegalCharacter( keyspace_name.to_string(), character, - )) + )); } }; } @@ -2238,12 +2244,12 @@ mod tests { use tokio::select; use tokio::sync::mpsc; - use super::{open_connection, HostConnectionConfig}; + use super::{HostConnectionConfig, open_connection}; use crate::cluster::metadata::UntranslatedEndpoint; use crate::cluster::node::ResolvedContactPoint; use crate::statement::unprepared::Statement; use crate::test_utils::setup_tracing; - use crate::utils::test_utils::{resolve_hostname, unique_keyspace_name, PerformDDL}; + use crate::utils::test_utils::{PerformDDL, resolve_hostname, unique_keyspace_name}; use futures::{StreamExt, TryStreamExt}; use std::collections::HashMap; use std::net::SocketAddr; diff --git a/scylla/src/network/connection_pool.rs b/scylla/src/network/connection_pool.rs index 7f65d089e6..d80439b501 100644 --- a/scylla/src/network/connection_pool.rs +++ b/scylla/src/network/connection_pool.rs @@ -1,6 +1,6 @@ use super::connection::{ - open_connection, open_connection_to_shard_aware_port, Connection, ConnectionConfig, - ErrorReceiver, HostConnectionConfig, VerifiedKeyspaceName, + Connection, ConnectionConfig, ErrorReceiver, HostConnectionConfig, VerifiedKeyspaceName, + open_connection, open_connection_to_shard_aware_port, }; use crate::errors::{ @@ -17,7 +17,7 @@ use crate::cluster::NodeAddr; use crate::utils::safe_format::IteratorSafeFormatExt; use arc_swap::ArcSwap; -use futures::{future::RemoteHandle, stream::FuturesUnordered, Future, FutureExt, StreamExt}; +use futures::{Future, FutureExt, StreamExt, future::RemoteHandle, stream::FuturesUnordered}; use rand::Rng; use std::convert::TryInto; use std::num::NonZeroUsize; @@ -26,7 +26,7 @@ use std::pin::Pin; use std::sync::{Arc, RwLock, Weak}; use std::time::Duration; -use tokio::sync::{broadcast, mpsc, Notify}; +use tokio::sync::{Notify, broadcast, mpsc}; use tracing::{debug, error, trace, warn}; /// The target size of a per-node connection pool. @@ -1195,7 +1195,7 @@ struct OpenedConnectionEvent { #[cfg(test)] mod tests { - use super::super::connection::{open_connection_to_shard_aware_port, HostConnectionConfig}; + use super::super::connection::{HostConnectionConfig, open_connection_to_shard_aware_port}; use crate::cluster::metadata::UntranslatedEndpoint; use crate::cluster::node::ResolvedContactPoint; use crate::routing::{ShardCount, Sharder}; diff --git a/scylla/src/observability/driver_tracing.rs b/scylla/src/observability/driver_tracing.rs index 9b41208f21..9434bae39c 100644 --- a/scylla/src/observability/driver_tracing.rs +++ b/scylla/src/observability/driver_tracing.rs @@ -9,9 +9,9 @@ use scylla_cql::frame::response::result::RawMetadataAndRawRows; use scylla_cql::value::deser_cql_value; use std::borrow::Borrow; use std::fmt::Display; +use std::sync::Arc; use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering; -use std::sync::Arc; use tracing::trace_span; pub(crate) struct RequestSpan { diff --git a/scylla/src/observability/history.rs b/scylla/src/observability/history.rs index 995596779d..cd34a1df64 100644 --- a/scylla/src/observability/history.rs +++ b/scylla/src/observability/history.rs @@ -355,11 +355,21 @@ impl From<&HistoryCollectorData> for StructuredHistory { match attempts.get_mut(attempt_id) { Some(attempt) => { if attempt.result.is_some() { - warn!("StructuredHistory - attempt with id {:?} has multiple results", attempt_id); + warn!( + "StructuredHistory - attempt with id {:?} has multiple results", + attempt_id + ); } - attempt.result = Some(AttemptResult::Error(*event_time, error.clone(), retry_decision.clone())); - }, - None => warn!("StructuredHistory - attempt with id {:?} finished with an error but not created", attempt_id) + attempt.result = Some(AttemptResult::Error( + *event_time, + error.clone(), + retry_decision.clone(), + )); + } + None => warn!( + "StructuredHistory - attempt with id {:?} finished with an error but not created", + attempt_id + ), } } HistoryEvent::NewRequest(request_id) => { @@ -506,7 +516,7 @@ mod tests { }; use assert_matches::assert_matches; use chrono::{DateTime, NaiveDate, NaiveDateTime, NaiveTime, Utc}; - use scylla_cql::{frame::response::CqlResponseKind, Consistency}; + use scylla_cql::{Consistency, frame::response::CqlResponseKind}; // Set a single time for all timestamps within StructuredHistory. // HistoryCollector sets the timestamp to current time which changes with each test. @@ -600,10 +610,12 @@ mod tests { let history: StructuredHistory = history_collector.clone_structured_history(); assert_eq!(history.requests.len(), 1); - assert!(history.requests[0] - .non_speculative_fiber - .attempts - .is_empty()); + assert!( + history.requests[0] + .non_speculative_fiber + .attempts + .is_empty() + ); assert!(history.requests[0].speculative_fibers.is_empty()); let displayed = "Requests History: @@ -720,20 +732,28 @@ mod tests { let history: StructuredHistory = history_collector.clone_structured_history(); assert_eq!(history.requests.len(), 1); - assert!(history.requests[0] - .non_speculative_fiber - .attempts - .is_empty()); + assert!( + history.requests[0] + .non_speculative_fiber + .attempts + .is_empty() + ); assert_eq!(history.requests[0].speculative_fibers.len(), 3); - assert!(history.requests[0].speculative_fibers[0] - .attempts - .is_empty()); - assert!(history.requests[0].speculative_fibers[1] - .attempts - .is_empty()); - assert!(history.requests[0].speculative_fibers[2] - .attempts - .is_empty()); + assert!( + history.requests[0].speculative_fibers[0] + .attempts + .is_empty() + ); + assert!( + history.requests[0].speculative_fibers[1] + .attempts + .is_empty() + ); + assert!( + history.requests[0].speculative_fibers[2] + .attempts + .is_empty() + ); let displayed = "Requests History: === Request #0 === diff --git a/scylla/src/observability/tracing.rs b/scylla/src/observability/tracing.rs index 72df29e359..8bce2a37e3 100644 --- a/scylla/src/observability/tracing.rs +++ b/scylla/src/observability/tracing.rs @@ -8,8 +8,8 @@ //! as well as return a tracing ID in the response, which can be used to query the tracing //! info later. -use crate::value::CqlTimestamp; use crate::DeserializeRow; +use crate::value::CqlTimestamp; use itertools::Itertools; use scylla_cql::value::CqlTimeuuid; use std::collections::HashMap; @@ -105,11 +105,9 @@ impl TracingInfo { } // A query used to query TracingInfo from system_traces.sessions -pub(crate) const TRACES_SESSION_QUERY_STR: &str = - "SELECT client, command, coordinator, duration, parameters, request, started_at \ +pub(crate) const TRACES_SESSION_QUERY_STR: &str = "SELECT client, command, coordinator, duration, parameters, request, started_at \ FROM system_traces.sessions WHERE session_id = ?"; // A query used to query TracingEvent from system_traces.events -pub(crate) const TRACES_EVENTS_QUERY_STR: &str = - "SELECT event_id, activity, source, source_elapsed, thread \ +pub(crate) const TRACES_EVENTS_QUERY_STR: &str = "SELECT event_id, activity, source, source_elapsed, thread \ FROM system_traces.events WHERE session_id = ?"; diff --git a/scylla/src/policies/load_balancing/default.rs b/scylla/src/policies/load_balancing/default.rs index 0b290976ad..7a95618d3a 100644 --- a/scylla/src/policies/load_balancing/default.rs +++ b/scylla/src/policies/load_balancing/default.rs @@ -11,7 +11,7 @@ use crate::{ routing::{Shard, Token}, }; use itertools::{Either, Itertools}; -use rand::{prelude::SliceRandom, rng, Rng}; +use rand::{Rng, prelude::SliceRandom, rng}; use rand_pcg::Pcg32; use scylla_cql::frame::response::result::TableSpec; use std::hash::{Hash, Hasher}; @@ -175,7 +175,8 @@ impl LoadBalancingPolicy for DefaultPolicy { Strategy::SimpleStrategy { .. } ) { - warn!("\ + warn!( + "\ Combining SimpleStrategy with preferred_datacenter set to Some and disabled datacenter failover may lead to empty query plans for some tokens.\ It is better to give up using one of them: either operate in a keyspace with NetworkTopologyStrategy, which explicitly states\ how many replicas there are in each datacenter (you probably want at least 1 to avoid empty plans while preferring that datacenter), \ @@ -1147,23 +1148,23 @@ impl<'a> TokenWithStrategy<'a> { mod tests { use std::collections::HashMap; - use scylla_cql::{frame::types::SerialConsistency, Consistency}; + use scylla_cql::{Consistency, frame::types::SerialConsistency}; use tracing::info; use self::framework::{ - get_plan_and_collect_node_identifiers, mock_cluster_state_for_token_unaware_tests, - ExpectedGroups, ExpectedGroupsBuilder, + ExpectedGroups, ExpectedGroupsBuilder, get_plan_and_collect_node_identifiers, + mock_cluster_state_for_token_unaware_tests, }; use crate::policies::host_filter::HostFilter; use crate::routing::locator::tablets::TabletsInfo; use crate::routing::locator::test::{ - id_to_invalid_addr, mock_metadata_for_token_aware_tests, TABLE_NTS_RF_2, TABLE_NTS_RF_3, - TABLE_SS_RF_2, + TABLE_NTS_RF_2, TABLE_NTS_RF_3, TABLE_SS_RF_2, id_to_invalid_addr, + mock_metadata_for_token_aware_tests, }; use crate::{ cluster::ClusterState, policies::load_balancing::{ - default::tests::framework::mock_cluster_state_for_token_aware_tests, Plan, RoutingInfo, + Plan, RoutingInfo, default::tests::framework::mock_cluster_state_for_token_aware_tests, }, routing::Token, test_utils::setup_tracing, @@ -1181,8 +1182,8 @@ mod tests { use crate::{ cluster::{ - metadata::{Metadata, Peer}, ClusterState, + metadata::{Metadata, Peer}, }, policies::load_balancing::{LoadBalancingPolicy, Plan, RoutingInfo}, routing::Token, @@ -2567,7 +2568,7 @@ mod tests { } mod latency_awareness { - use futures::{future::RemoteHandle, FutureExt}; + use futures::{FutureExt, future::RemoteHandle}; use itertools::Either; use tokio::time::{Duration, Instant}; use tracing::{trace, warn}; @@ -2581,8 +2582,8 @@ mod latency_awareness { collections::HashMap, ops::Deref, sync::{ - atomic::{AtomicU64, Ordering}, Arc, RwLock, + atomic::{AtomicU64, Ordering}, }, }; @@ -3131,8 +3132,8 @@ mod latency_awareness { use scylla_cql::Consistency; use super::{ - super::tests::{framework::*, EMPTY_ROUTING_INFO}, super::DefaultPolicy, + super::tests::{EMPTY_ROUTING_INFO, framework::*}, *, }; @@ -3141,13 +3142,13 @@ mod latency_awareness { cluster::NodeAddr, policies::load_balancing::default::NodeLocationPreference, policies::load_balancing::{ - default::tests::test_default_policy_with_given_cluster_and_routing_info, RoutingInfo, + default::tests::test_default_policy_with_given_cluster_and_routing_info, }, - routing::locator::test::{id_to_invalid_addr, A, B, C, D, E, F, G}, - routing::locator::test::{TABLE_INVALID, TABLE_NTS_RF_2, TABLE_NTS_RF_3}, routing::Shard, routing::Token, + routing::locator::test::{A, B, C, D, E, F, G, id_to_invalid_addr}, + routing::locator::test::{TABLE_INVALID, TABLE_NTS_RF_2, TABLE_NTS_RF_3}, test_utils::setup_tracing, }; use tokio::time::Instant; @@ -3526,8 +3527,8 @@ mod latency_awareness { } #[tokio::test] - async fn latency_aware_default_policy_stops_penalising_after_min_average_increases_enough_only_after_update_rate_elapses( - ) { + async fn latency_aware_default_policy_stops_penalising_after_min_average_increases_enough_only_after_update_rate_elapses() + { setup_tracing(); let (policy, updater) = latency_aware_default_policy_with_explicit_updater(); diff --git a/scylla/src/policies/load_balancing/plan.rs b/scylla/src/policies/load_balancing/plan.rs index 7daf9fb4f6..4bf887af11 100644 --- a/scylla/src/policies/load_balancing/plan.rs +++ b/scylla/src/policies/load_balancing/plan.rs @@ -1,4 +1,4 @@ -use rand::{rng, Rng}; +use rand::{Rng, rng}; use tracing::error; use super::{FallbackPlan, LoadBalancingPolicy, NodeRef, RoutingInfo}; @@ -132,7 +132,10 @@ impl<'a> Iterator for Plan<'a> { }; Some(Self::with_random_shard_if_unknown(node)) } else { - error!("Load balancing policy returned an empty plan! The query cannot be executed. Routing info: {:?}", self.routing_info); + error!( + "Load balancing policy returned an empty plan! The query cannot be executed. Routing info: {:?}", + self.routing_info + ); self.state = PlanState::PickedNone; None } diff --git a/scylla/src/policies/speculative_execution.rs b/scylla/src/policies/speculative_execution.rs index d6d6dbf17d..918acf3b53 100644 --- a/scylla/src/policies/speculative_execution.rs +++ b/scylla/src/policies/speculative_execution.rs @@ -10,7 +10,7 @@ use futures::{ #[cfg(feature = "metrics")] use std::sync::Arc; use std::{future::Future, time::Duration}; -use tracing::{trace_span, Instrument}; +use tracing::{Instrument, trace_span}; use crate::errors::{RequestAttemptError, RequestError}; #[cfg(feature = "metrics")] diff --git a/scylla/src/policies/timestamp_generator.rs b/scylla/src/policies/timestamp_generator.rs index ca7ed398e1..1e7135668d 100644 --- a/scylla/src/policies/timestamp_generator.rs +++ b/scylla/src/policies/timestamp_generator.rs @@ -7,8 +7,8 @@ use std::{ time::{SystemTime, UNIX_EPOCH}, }; -use std::sync::atomic::Ordering; use std::sync::Mutex; +use std::sync::atomic::Ordering; use tokio::time::{Duration, Instant}; use tracing::warn; diff --git a/scylla/src/response/request_response.rs b/scylla/src/response/request_response.rs index ec821dcdf3..a7b3d02fb7 100644 --- a/scylla/src/response/request_response.rs +++ b/scylla/src/response/request_response.rs @@ -9,10 +9,10 @@ use uuid::Uuid; use crate::errors::RequestAttemptError; use crate::frame::response::{self, result}; -use crate::response::query_result::QueryResult; use crate::response::Coordinator; -use crate::statement::prepared::PreparedStatement; +use crate::response::query_result::QueryResult; use crate::statement::Statement; +use crate::statement::prepared::PreparedStatement; pub(crate) struct QueryResponse { pub(crate) response: Response, @@ -73,7 +73,7 @@ impl NonErrorQueryResponse { _ => { return Err(RequestAttemptError::UnexpectedResponse( response.to_response_kind(), - )) + )); } }; diff --git a/scylla/src/routing/locator/mod.rs b/scylla/src/routing/locator/mod.rs index 99c84af859..464484b073 100644 --- a/scylla/src/routing/locator/mod.rs +++ b/scylla/src/routing/locator/mod.rs @@ -17,7 +17,7 @@ pub(crate) mod tablets; pub(crate) mod test; mod token_ring; -use rand::{seq::IteratorRandom, Rng}; +use rand::{Rng, seq::IteratorRandom}; use scylla_cql::frame::response::result::TableSpec; pub use token_ring::TokenRing; @@ -28,7 +28,7 @@ use crate::cluster::{Node, NodeRef}; use crate::routing::{Shard, Token}; use itertools::Itertools; use precomputed_replicas::PrecomputedReplicas; -use replicas::{ReplicasArray, EMPTY_REPLICAS}; +use replicas::{EMPTY_REPLICAS, ReplicasArray}; use replication_info::ReplicationInfo; use std::{ cmp, @@ -175,7 +175,10 @@ impl ReplicaLocator { } } Strategy::Other { name, .. } => { - debug!("Unknown strategy ({}), falling back to SimpleStrategy with replication_factor = 1", name) + debug!( + "Unknown strategy ({}), falling back to SimpleStrategy with replication_factor = 1", + name + ) } _ => (), } @@ -848,7 +851,7 @@ impl<'a> IntoIterator for ReplicasOrdered<'a> { #[cfg(test)] mod tests { - use crate::{routing::locator::test::*, routing::Token, test_utils::setup_tracing}; + use crate::{routing::Token, routing::locator::test::*, test_utils::setup_tracing}; #[tokio::test] async fn test_replicas_ordered() { diff --git a/scylla/src/routing/locator/precomputed_replicas.rs b/scylla/src/routing/locator/precomputed_replicas.rs index f37282c204..badab398f1 100644 --- a/scylla/src/routing/locator/precomputed_replicas.rs +++ b/scylla/src/routing/locator/precomputed_replicas.rs @@ -12,8 +12,8 @@ //! Notes on Network Topology Strategy precomputation: //! The optimization mentioned above works only if requested `replication factor` is <= `rack count`. -use super::replication_info::ReplicationInfo; use super::TokenRing; +use super::replication_info::ReplicationInfo; use crate::cluster::metadata::Strategy; use crate::cluster::node::Node; use crate::routing::Token; @@ -216,10 +216,10 @@ mod tests { use crate::{ cluster::metadata::{Keyspace, Strategy}, + routing::Token, routing::locator::test::{ - create_ring, mock_metadata_for_token_aware_tests, A, C, D, E, F, G, + A, C, D, E, F, G, create_ring, mock_metadata_for_token_aware_tests, }, - routing::Token, test_utils::setup_tracing, }; diff --git a/scylla/src/routing/locator/replication_info.rs b/scylla/src/routing/locator/replication_info.rs index 7076441251..e8e22082c0 100644 --- a/scylla/src/routing/locator/replication_info.rs +++ b/scylla/src/routing/locator/replication_info.rs @@ -205,10 +205,10 @@ where #[cfg(test)] mod tests { use crate::{ + routing::Token, routing::locator::test::{ - create_ring, mock_metadata_for_token_aware_tests, A, B, C, D, E, F, G, + A, B, C, D, E, F, G, create_ring, mock_metadata_for_token_aware_tests, }, - routing::Token, test_utils::setup_tracing, }; diff --git a/scylla/src/routing/locator/tablets.rs b/scylla/src/routing/locator/tablets.rs index 00ab17c57f..d17941705f 100644 --- a/scylla/src/routing/locator/tablets.rs +++ b/scylla/src/routing/locator/tablets.rs @@ -605,17 +605,17 @@ mod tests { use bytes::Bytes; use scylla_cql::frame::response::result::{CollectionType, ColumnType, NativeType, TableSpec}; - use scylla_cql::serialize::value::SerializeValue; use scylla_cql::serialize::CellWriter; + use scylla_cql::serialize::value::SerializeValue; use tracing::debug; use uuid::Uuid; use crate::cluster::Node; + use crate::routing::Token; use crate::routing::locator::tablets::{ - RawTablet, RawTabletReplicas, TabletParsingError, CUSTOM_PAYLOAD_TABLETS_V1_KEY, - RAW_TABLETS_CQL_TYPE, + CUSTOM_PAYLOAD_TABLETS_V1_KEY, RAW_TABLETS_CQL_TYPE, RawTablet, RawTabletReplicas, + TabletParsingError, }; - use crate::routing::Token; use crate::test_utils::setup_tracing; use crate::value::CqlValue; diff --git a/scylla/src/routing/locator/test.rs b/scylla/src/routing/locator/test.rs index 98c9d92be4..8a83e34733 100644 --- a/scylla/src/routing/locator/test.rs +++ b/scylla/src/routing/locator/test.rs @@ -5,8 +5,8 @@ use uuid::Uuid; use super::tablets::TabletsInfo; use super::{ReplicaLocator, ReplicaSet}; -use crate::cluster::metadata::{Keyspace, Metadata, Peer, Strategy}; use crate::cluster::Node; +use crate::cluster::metadata::{Keyspace, Metadata, Peer, Strategy}; use crate::cluster::{NodeAddr, NodeRef}; use crate::network::PoolConfig; use crate::routing::Token; diff --git a/scylla/src/statement/prepared.rs b/scylla/src/statement/prepared.rs index 327751ac09..3ab1906003 100644 --- a/scylla/src/statement/prepared.rs +++ b/scylla/src/statement/prepared.rs @@ -6,9 +6,9 @@ use scylla_cql::frame::response::result::{ ColumnSpec, PartitionKeyIndex, ResultMetadata, TableSpec, }; use scylla_cql::frame::types::RawValue; -use scylla_cql::serialize::row::{RowSerializationContext, SerializeRow, SerializedValues}; use scylla_cql::serialize::SerializationError; -use smallvec::{smallvec, SmallVec}; +use scylla_cql::serialize::row::{RowSerializationContext, SerializeRow, SerializedValues}; +use smallvec::{SmallVec, smallvec}; use std::convert::TryInto; use std::sync::Arc; use std::time::Duration; @@ -24,8 +24,8 @@ use crate::observability::history::HistoryListener; use crate::policies::load_balancing::LoadBalancingPolicy; use crate::policies::retry::RetryPolicy; use crate::response::query_result::ColumnSpecs; -use crate::routing::partitioner::{Partitioner, PartitionerHasher, PartitionerName}; use crate::routing::Token; +use crate::routing::partitioner::{Partitioner, PartitionerHasher, PartitionerName}; /// Represents a statement prepared on the server. /// diff --git a/scylla/src/utils/test_utils.rs b/scylla/src/utils/test_utils.rs index caf5ce91e8..c8e205f3f8 100644 --- a/scylla/src/utils/test_utils.rs +++ b/scylla/src/utils/test_utils.rs @@ -1,8 +1,8 @@ use scylla_cql::frame::response::error::DbError; use tracing::{error, warn}; +use tracing_subscriber::Layer; use tracing_subscriber::layer::SubscriberExt; use tracing_subscriber::util::SubscriberInitExt; -use tracing_subscriber::Layer; use crate::client::caching_session::CachingSession; use crate::client::session::Session; @@ -191,10 +191,15 @@ impl RetrySession for SchemaQueriesRetrySession { // In this case we really should do something about it in the // core, because it is absurd for DDL queries to fail this often. if self.count >= 10 { - error!("Received TENTH(!) group 0 concurrent modification error during DDL. Please fix ScyllaDB Core."); + error!( + "Received TENTH(!) group 0 concurrent modification error during DDL. Please fix ScyllaDB Core." + ); RetryDecision::DontRetry } else { - warn!("Received group 0 concurrent modification error during DDL. Performing retry #{}.", self.count); + warn!( + "Received group 0 concurrent modification error during DDL. Performing retry #{}.", + self.count + ); RetryDecision::RetrySameTarget(None) } } diff --git a/scylla/tests/integration/ccm/authenticate.rs b/scylla/tests/integration/ccm/authenticate.rs index 43cf21bdfc..0e988f98dd 100644 --- a/scylla/tests/integration/ccm/authenticate.rs +++ b/scylla/tests/integration/ccm/authenticate.rs @@ -7,8 +7,8 @@ use scylla::errors::AuthError; use tokio::sync::Mutex; use crate::ccm::lib::cluster::{Cluster, ClusterOptions}; -use crate::ccm::lib::{run_ccm_test_with_configuration, CLUSTER_VERSION}; -use crate::utils::{setup_tracing, unique_keyspace_name, PerformDDL}; +use crate::ccm::lib::{CLUSTER_VERSION, run_ccm_test_with_configuration}; +use crate::utils::{PerformDDL, setup_tracing, unique_keyspace_name}; fn cluster_1_node() -> ClusterOptions { ClusterOptions { diff --git a/scylla/tests/integration/ccm/example.rs b/scylla/tests/integration/ccm/example.rs index ad59084bcd..a4b615aca1 100644 --- a/scylla/tests/integration/ccm/example.rs +++ b/scylla/tests/integration/ccm/example.rs @@ -1,7 +1,7 @@ use std::sync::Arc; use crate::ccm::lib::cluster::{Cluster, ClusterOptions}; -use crate::ccm::lib::{run_ccm_test, CLUSTER_VERSION}; +use crate::ccm::lib::{CLUSTER_VERSION, run_ccm_test}; use crate::utils::setup_tracing; use tokio::sync::Mutex; diff --git a/scylla/tests/integration/ccm/lib/cluster.rs b/scylla/tests/integration/ccm/lib/cluster.rs index 6e65d38dfa..f6ac3ee916 100644 --- a/scylla/tests/integration/ccm/lib/cluster.rs +++ b/scylla/tests/integration/ccm/lib/cluster.rs @@ -1,8 +1,8 @@ use crate::ccm::lib::node::NodeOptions; -use super::cli_wrapper::cluster::Ccm; use super::cli_wrapper::DBType; use super::cli_wrapper::NodeStartOptions; +use super::cli_wrapper::cluster::Ccm; use super::ip_allocator::NetPrefix; use super::logged_cmd::LoggedCmd; use super::node::{Node, NodeId, NodeStatus}; diff --git a/scylla/tests/integration/ccm/lib/logged_cmd.rs b/scylla/tests/integration/ccm/lib/logged_cmd.rs index 39d5fec490..391dd6bf20 100644 --- a/scylla/tests/integration/ccm/lib/logged_cmd.rs +++ b/scylla/tests/integration/ccm/lib/logged_cmd.rs @@ -269,9 +269,9 @@ impl LoggedCmd { mod tests { use std::fmt::Write; use std::sync::{Arc, Mutex}; + use tracing::Subscriber; use tracing::field::Field; use tracing::subscriber::DefaultGuard; - use tracing::Subscriber; use tracing_subscriber::layer::{Context, SubscriberExt}; use tracing_subscriber::registry::LookupSpan; use tracing_subscriber::{Layer, Registry}; @@ -345,7 +345,10 @@ mod tests { .unwrap(); let log_contents = logs.lock().unwrap().join("\n"); - assert_eq!(log_contents, "started[1] -> echo Test Success\nstdout[1] -> Test Success\nexited[1] -> status = 0"); + assert_eq!( + log_contents, + "started[1] -> echo Test Success\nstdout[1] -> Test Success\nexited[1] -> status = 0" + ); } #[tokio::test] @@ -360,13 +363,17 @@ mod tests { .err(); assert!(err.is_some()); - assert!(err - .unwrap() - .to_string() - .contains("No such file or directory")); + assert!( + err.unwrap() + .to_string() + .contains("No such file or directory") + ); let log_contents = logs.lock().unwrap().join("\n"); - assert_eq!(log_contents, "started[1] -> ls /nonexistent_path\nstderr[1] -> ls: cannot access '/nonexistent_path': No such file or directory\nexited[1] -> status = 2"); + assert_eq!( + log_contents, + "started[1] -> ls /nonexistent_path\nstderr[1] -> ls: cannot access '/nonexistent_path': No such file or directory\nexited[1] -> status = 2" + ); } #[tokio::test] @@ -387,7 +394,10 @@ mod tests { assert_eq!(status.code(), Some(2)); let log_contents = logs.lock().unwrap().join("\n"); - assert_eq!(log_contents, "started[1] -> ls /nonexistent_path\nstderr[1] -> ls: cannot access '/nonexistent_path': No such file or directory\nexited[1] -> status = 2"); + assert_eq!( + log_contents, + "started[1] -> ls /nonexistent_path\nstderr[1] -> ls: cannot access '/nonexistent_path': No such file or directory\nexited[1] -> status = 2" + ); } #[tokio::test] @@ -408,7 +418,10 @@ mod tests { .unwrap(); let log_contents = logs.lock().unwrap().join("\n"); - assert_eq!(log_contents, "env[1] -> TEST_ENV=12345\nstarted[1] -> printenv TEST_ENV\nstdout[1] -> 12345\nexited[1] -> status = 0"); + assert_eq!( + log_contents, + "env[1] -> TEST_ENV=12345\nstarted[1] -> printenv TEST_ENV\nstdout[1] -> 12345\nexited[1] -> status = 0" + ); } } @@ -428,7 +441,10 @@ mod tests { .unwrap(); let log_contents = logs.lock().unwrap().join("\n"); - assert_eq!(log_contents, "started[1] -> echo Test Success\nstdout[1] -> Test Success\nexited[1] -> status = 0"); + assert_eq!( + log_contents, + "started[1] -> echo Test Success\nstdout[1] -> Test Success\nexited[1] -> status = 0" + ); } #[test] @@ -442,13 +458,17 @@ mod tests { .err(); assert!(err.is_some()); - assert!(err - .unwrap() - .to_string() - .contains("No such file or directory")); + assert!( + err.unwrap() + .to_string() + .contains("No such file or directory") + ); let log_contents = logs.lock().unwrap().join("\n"); - assert_eq!(log_contents, "started[1] -> ls /nonexistent_path\nstderr[1] -> ls: cannot access '/nonexistent_path': No such file or directory\nexited[1] -> status = 2"); + assert_eq!( + log_contents, + "started[1] -> ls /nonexistent_path\nstderr[1] -> ls: cannot access '/nonexistent_path': No such file or directory\nexited[1] -> status = 2" + ); } #[test] @@ -468,7 +488,10 @@ mod tests { assert_eq!(status.code(), Some(2)); let log_contents = logs.lock().unwrap().join("\n"); - assert_eq!(log_contents, "started[1] -> ls /nonexistent_path\nstderr[1] -> ls: cannot access '/nonexistent_path': No such file or directory\nexited[1] -> status = 2"); + assert_eq!( + log_contents, + "started[1] -> ls /nonexistent_path\nstderr[1] -> ls: cannot access '/nonexistent_path': No such file or directory\nexited[1] -> status = 2" + ); } #[test] @@ -488,7 +511,10 @@ mod tests { .unwrap(); let log_contents = logs.lock().unwrap().join("\n"); - assert_eq!(log_contents, "env[1] -> TEST_ENV=12345\nstarted[1] -> printenv TEST_ENV\nstdout[1] -> 12345\nexited[1] -> status = 0"); + assert_eq!( + log_contents, + "env[1] -> TEST_ENV=12345\nstarted[1] -> printenv TEST_ENV\nstdout[1] -> 12345\nexited[1] -> status = 0" + ); } } } diff --git a/scylla/tests/integration/load_balancing/lwt_optimisation.rs b/scylla/tests/integration/load_balancing/lwt_optimisation.rs index 4c0814c669..bad48d103a 100644 --- a/scylla/tests/integration/load_balancing/lwt_optimisation.rs +++ b/scylla/tests/integration/load_balancing/lwt_optimisation.rs @@ -1,6 +1,6 @@ use crate::utils::{ - scylla_supports_tablets, setup_tracing, test_with_3_node_cluster, unique_keyspace_name, - PerformDDL, + PerformDDL, scylla_supports_tablets, setup_tracing, test_with_3_node_cluster, + unique_keyspace_name, }; use scylla::client::execution_profile::ExecutionProfile; use scylla::client::session::Session; diff --git a/scylla/tests/integration/load_balancing/shards.rs b/scylla/tests/integration/load_balancing/shards.rs index b613a160b7..fbcd7cfb50 100644 --- a/scylla/tests/integration/load_balancing/shards.rs +++ b/scylla/tests/integration/load_balancing/shards.rs @@ -2,8 +2,8 @@ use std::collections::HashSet; use std::sync::Arc; use crate::utils::{ - create_new_session_builder, scylla_supports_tablets, setup_tracing, test_with_3_node_cluster, - unique_keyspace_name, PerformDDL, + PerformDDL, create_new_session_builder, scylla_supports_tablets, setup_tracing, + test_with_3_node_cluster, unique_keyspace_name, }; use scylla::client::execution_profile::ExecutionProfile; use scylla::client::session_builder::SessionBuilder; diff --git a/scylla/tests/integration/load_balancing/simple_strategy.rs b/scylla/tests/integration/load_balancing/simple_strategy.rs index 8d3c5f0b6f..5e197fe2e5 100644 --- a/scylla/tests/integration/load_balancing/simple_strategy.rs +++ b/scylla/tests/integration/load_balancing/simple_strategy.rs @@ -1,4 +1,4 @@ -use crate::utils::{create_new_session_builder, unique_keyspace_name, PerformDDL as _}; +use crate::utils::{PerformDDL as _, create_new_session_builder, unique_keyspace_name}; /// It's recommended to use NetworkTopologyStrategy everywhere, so most tests use only NetworkTopologyStrategy. /// We still support SimpleStrategy, so to make sure that SimpleStrategy works correctly this test runs diff --git a/scylla/tests/integration/load_balancing/tablets.rs b/scylla/tests/integration/load_balancing/tablets.rs index 312c26dba2..1257babbe9 100644 --- a/scylla/tests/integration/load_balancing/tablets.rs +++ b/scylla/tests/integration/load_balancing/tablets.rs @@ -1,13 +1,13 @@ use std::sync::Arc; use crate::utils::{ - execute_prepared_statement_everywhere, execute_unprepared_statement_everywhere, + PerformDDL, execute_prepared_statement_everywhere, execute_unprepared_statement_everywhere, scylla_supports_tablets, setup_tracing, supports_feature, test_with_3_node_cluster, - unique_keyspace_name, PerformDDL, + unique_keyspace_name, }; -use futures::future::try_join_all; use futures::TryStreamExt; +use futures::future::try_join_all; use itertools::Itertools; use scylla::client::session::Session; use scylla::cluster::Node; diff --git a/scylla/tests/integration/load_balancing/token_awareness.rs b/scylla/tests/integration/load_balancing/token_awareness.rs index aecca38176..c2a303cfec 100644 --- a/scylla/tests/integration/load_balancing/token_awareness.rs +++ b/scylla/tests/integration/load_balancing/token_awareness.rs @@ -1,6 +1,6 @@ use crate::utils::{ - create_new_session_builder, scylla_supports_tablets, setup_tracing, unique_keyspace_name, - PerformDDL as _, + PerformDDL as _, create_new_session_builder, scylla_supports_tablets, setup_tracing, + unique_keyspace_name, }; #[tokio::test] diff --git a/scylla/tests/integration/macros/complex_pk.rs b/scylla/tests/integration/macros/complex_pk.rs index 99f49d8cda..ffafa54e2d 100644 --- a/scylla/tests/integration/macros/complex_pk.rs +++ b/scylla/tests/integration/macros/complex_pk.rs @@ -1,5 +1,5 @@ use crate::utils::{ - create_new_session_builder, setup_tracing, unique_keyspace_name, PerformDDL as _, + PerformDDL as _, create_new_session_builder, setup_tracing, unique_keyspace_name, }; #[tokio::test] diff --git a/scylla/tests/integration/metadata/configuration.rs b/scylla/tests/integration/metadata/configuration.rs index 00de96559c..1e02616db0 100644 --- a/scylla/tests/integration/metadata/configuration.rs +++ b/scylla/tests/integration/metadata/configuration.rs @@ -2,8 +2,8 @@ //! iff ScyllaDB is the target node (else ignores the custom timeout). use crate::utils::{ - create_new_session_builder, setup_tracing, test_with_3_node_cluster, unique_keyspace_name, - PerformDDL as _, + PerformDDL as _, create_new_session_builder, setup_tracing, test_with_3_node_cluster, + unique_keyspace_name, }; use scylla::client::session::Session; use scylla::client::session_builder::SessionBuilder; @@ -18,8 +18,8 @@ use std::net::SocketAddr; use std::sync::Arc; use std::time::Duration; use tokio::sync::mpsc; -use tokio::sync::mpsc::error::TryRecvError; use tokio::sync::mpsc::UnboundedReceiver; +use tokio::sync::mpsc::error::TryRecvError; use tracing::info; // By default, custom metadata request timeout is set to 2 seconds. @@ -341,14 +341,18 @@ async fn test_keyspaces_to_fetch() { .unwrap(); } session_default.await_schema_agreement().await.unwrap(); - assert!(session_default - .get_cluster_state() - .get_keyspace(&ks1) - .is_some()); - assert!(session_default - .get_cluster_state() - .get_keyspace(&ks2) - .is_some()); + assert!( + session_default + .get_cluster_state() + .get_keyspace(&ks1) + .is_some() + ); + assert!( + session_default + .get_cluster_state() + .get_keyspace(&ks2) + .is_some() + ); let session1 = create_new_session_builder() .keyspaces_to_fetch([&ks1]) diff --git a/scylla/tests/integration/metadata/contents.rs b/scylla/tests/integration/metadata/contents.rs index f0dd358139..bbeaf993ea 100644 --- a/scylla/tests/integration/metadata/contents.rs +++ b/scylla/tests/integration/metadata/contents.rs @@ -7,8 +7,8 @@ use scylla::{ }; use crate::utils::{ - create_new_session_builder, scylla_supports_tablets, setup_tracing, unique_keyspace_name, - PerformDDL as _, + PerformDDL as _, create_new_session_builder, scylla_supports_tablets, setup_tracing, + unique_keyspace_name, }; fn udt_type_a_def(ks: &str) -> Arc> { @@ -453,7 +453,9 @@ async fn test_views_in_schema_info() { let session = create_new_session_builder().build().await.unwrap(); let ks = unique_keyspace_name(); - let mut create_ks = format!("CREATE KEYSPACE IF NOT EXISTS {ks} WITH REPLICATION = {{'class' : 'NetworkTopologyStrategy', 'replication_factor' : 1}}"); + let mut create_ks = format!( + "CREATE KEYSPACE IF NOT EXISTS {ks} WITH REPLICATION = {{'class' : 'NetworkTopologyStrategy', 'replication_factor' : 1}}" + ); // Materialized views + tablets are not supported in Scylla 2025.1. if scylla_supports_tablets(&session).await { create_ks += " and TABLETS = { 'enabled': false}"; diff --git a/scylla/tests/integration/session/cluster_reachability.rs b/scylla/tests/integration/session/cluster_reachability.rs index e6b70e102e..c4e4500c3a 100644 --- a/scylla/tests/integration/session/cluster_reachability.rs +++ b/scylla/tests/integration/session/cluster_reachability.rs @@ -4,8 +4,8 @@ use scylla::client::session::Session; use scylla::serialize::row::SerializeRow; use crate::utils::{ - create_new_session_builder, execute_prepared_statement_everywhere, setup_tracing, - unique_keyspace_name, PerformDDL as _, + PerformDDL as _, create_new_session_builder, execute_prepared_statement_everywhere, + setup_tracing, unique_keyspace_name, }; /// Tests that all nodes are reachable and can serve requests. diff --git a/scylla/tests/integration/session/db_errors.rs b/scylla/tests/integration/session/db_errors.rs index c5d89d7403..6c17db62a3 100644 --- a/scylla/tests/integration/session/db_errors.rs +++ b/scylla/tests/integration/session/db_errors.rs @@ -1,5 +1,5 @@ use crate::utils::{ - create_new_session_builder, setup_tracing, supports_feature, unique_keyspace_name, PerformDDL, + PerformDDL, create_new_session_builder, setup_tracing, supports_feature, unique_keyspace_name, }; use scylla::errors::OperationType; diff --git a/scylla/tests/integration/session/history.rs b/scylla/tests/integration/session/history.rs index 92c052f18f..cde552a1fd 100644 --- a/scylla/tests/integration/session/history.rs +++ b/scylla/tests/integration/session/history.rs @@ -10,7 +10,7 @@ use scylla::observability::history::{ use scylla::statement::unprepared::Statement; use scylla::value::Row; -use crate::utils::{create_new_session_builder, setup_tracing, unique_keyspace_name, PerformDDL}; +use crate::utils::{PerformDDL, create_new_session_builder, setup_tracing, unique_keyspace_name}; // Set a single time for all timestamps within StructuredHistory. // HistoryCollector sets the timestamp to current time which changes with each test. diff --git a/scylla/tests/integration/session/pager.rs b/scylla/tests/integration/session/pager.rs index b86cdd6c4c..38f8583c6a 100644 --- a/scylla/tests/integration/session/pager.rs +++ b/scylla/tests/integration/session/pager.rs @@ -1,6 +1,6 @@ use std::sync::{ - atomic::{AtomicBool, Ordering}, Arc, + atomic::{AtomicBool, Ordering}, }; use futures::{StreamExt as _, TryStreamExt as _}; @@ -13,8 +13,8 @@ use scylla::{ use scylla_cql::Consistency; use crate::utils::{ - create_new_session_builder, scylla_supports_tablets, setup_tracing, unique_keyspace_name, - PerformDDL as _, + PerformDDL as _, create_new_session_builder, scylla_supports_tablets, setup_tracing, + unique_keyspace_name, }; // Reproduces the problem with execute_iter mentioned in #608. @@ -59,7 +59,11 @@ async fn test_iter_works_when_retry_policy_returns_ignore_write_error() { // Create a keyspace with replication factor that is larger than the cluster size let cluster_size = session.get_cluster_state().get_nodes_info().len(); let ks = unique_keyspace_name(); - let mut create_ks = format!("CREATE KEYSPACE {} WITH REPLICATION = {{'class': 'NetworkTopologyStrategy', 'replication_factor': {}}}", ks, cluster_size + 1); + let mut create_ks = format!( + "CREATE KEYSPACE {} WITH REPLICATION = {{'class': 'NetworkTopologyStrategy', 'replication_factor': {}}}", + ks, + cluster_size + 1 + ); if scylla_supports_tablets(&session).await { create_ks += " and TABLETS = { 'enabled': false}"; } diff --git a/scylla/tests/integration/session/retries.rs b/scylla/tests/integration/session/retries.rs index ca109c3755..67d0056541 100644 --- a/scylla/tests/integration/session/retries.rs +++ b/scylla/tests/integration/session/retries.rs @@ -1,4 +1,4 @@ -use crate::utils::{setup_tracing, test_with_3_node_cluster, unique_keyspace_name, PerformDDL}; +use crate::utils::{PerformDDL, setup_tracing, test_with_3_node_cluster, unique_keyspace_name}; use scylla::client::execution_profile::ExecutionProfile; use scylla::client::session::Session; use scylla::client::session_builder::SessionBuilder; diff --git a/scylla/tests/integration/session/schema_agreement.rs b/scylla/tests/integration/session/schema_agreement.rs index 4b9160798f..493c9ca58a 100644 --- a/scylla/tests/integration/session/schema_agreement.rs +++ b/scylla/tests/integration/session/schema_agreement.rs @@ -36,7 +36,9 @@ async fn run_some_ddl_with_unreachable_node( )])); let ks = unique_keyspace_name(); - let mut request = Statement::new(format!("CREATE KEYSPACE {ks} WITH REPLICATION = {{'class' : 'NetworkTopologyStrategy', 'replication_factor' : 1}}")); + let mut request = Statement::new(format!( + "CREATE KEYSPACE {ks} WITH REPLICATION = {{'class' : 'NetworkTopologyStrategy', 'replication_factor' : 1}}" + )); request.set_load_balancing_policy(Some(SingleTargetLoadBalancingPolicy::new( coordinator, None, diff --git a/scylla/tests/integration/session/self_identity.rs b/scylla/tests/integration/session/self_identity.rs index b28173c54d..a634bca9d4 100644 --- a/scylla/tests/integration/session/self_identity.rs +++ b/scylla/tests/integration/session/self_identity.rs @@ -1,7 +1,7 @@ use crate::utils::{setup_tracing, test_with_3_node_cluster}; +use scylla::client::SelfIdentity; use scylla::client::session::Session; use scylla::client::session_builder::SessionBuilder; -use scylla::client::SelfIdentity; use scylla_cql::frame::request::options; use scylla_cql::frame::types; use scylla_proxy::{ diff --git a/scylla/tests/integration/session/tracing.rs b/scylla/tests/integration/session/tracing.rs index cc670e312a..e2e88bc0d4 100644 --- a/scylla/tests/integration/session/tracing.rs +++ b/scylla/tests/integration/session/tracing.rs @@ -2,13 +2,13 @@ use scylla::{ client::session::Session, observability::tracing::TracingInfo, response::query_result::QueryResult, - statement::{batch::Batch, Statement}, + statement::{Statement, batch::Batch}, }; use scylla_cql::Consistency; use uuid::Uuid; use crate::utils::{ - create_new_session_builder, setup_tracing, unique_keyspace_name, PerformDDL as _, + PerformDDL as _, create_new_session_builder, setup_tracing, unique_keyspace_name, }; #[tokio::test] diff --git a/scylla/tests/integration/session/use_keyspace.rs b/scylla/tests/integration/session/use_keyspace.rs index ef2f6a1e9e..edaee0566c 100644 --- a/scylla/tests/integration/session/use_keyspace.rs +++ b/scylla/tests/integration/session/use_keyspace.rs @@ -4,7 +4,7 @@ use scylla::{ }; use crate::utils::{ - create_new_session_builder, setup_tracing, unique_keyspace_name, PerformDDL as _, + PerformDDL as _, create_new_session_builder, setup_tracing, unique_keyspace_name, }; #[tokio::test] @@ -50,10 +50,12 @@ async fn test_use_keyspace() { assert_eq!(rows, vec!["test1".to_string(), "test2".to_string()]); // Test that trying to use nonexisting keyspace fails - assert!(session - .use_keyspace("this_keyspace_does_not_exist_at_all", false) - .await - .is_err()); + assert!( + session + .use_keyspace("this_keyspace_does_not_exist_at_all", false) + .await + .is_err() + ); // Test that invalid keyspaces get rejected assert!(matches!( @@ -223,15 +225,19 @@ async fn test_raw_use_keyspace() { assert_eq!(rows, vec!["raw_test".to_string()]); // Check if case sensitivity is correctly detected - assert!(session - .query_unpaged(format!("use \"{}\" ;", ks.to_uppercase()), &[]) - .await - .is_err()); - - assert!(session - .query_unpaged(format!("use {} ;", ks.to_uppercase()), &[]) - .await - .is_ok()); + assert!( + session + .query_unpaged(format!("use \"{}\" ;", ks.to_uppercase()), &[]) + .await + .is_err() + ); + + assert!( + session + .query_unpaged(format!("use {} ;", ks.to_uppercase()), &[]) + .await + .is_ok() + ); session.ddl(format!("DROP KEYSPACE {ks}")).await.unwrap(); } diff --git a/scylla/tests/integration/statements/batch.rs b/scylla/tests/integration/statements/batch.rs index bfbb8d50f8..fe7f51a825 100644 --- a/scylla/tests/integration/statements/batch.rs +++ b/scylla/tests/integration/statements/batch.rs @@ -1,6 +1,6 @@ use crate::utils::{ - create_new_session_builder, scylla_supports_tablets, setup_tracing, unique_keyspace_name, - PerformDDL as _, + PerformDDL as _, create_new_session_builder, scylla_supports_tablets, setup_tracing, + unique_keyspace_name, }; use assert_matches::assert_matches; use scylla::client::session::Session; @@ -248,7 +248,9 @@ async fn test_batch_lwts() { let session = create_new_session_builder().build().await.unwrap(); let ks = unique_keyspace_name(); - let mut create_ks = format!("CREATE KEYSPACE {ks} WITH REPLICATION = {{'class': 'NetworkTopologyStrategy', 'replication_factor': 1}}"); + let mut create_ks = format!( + "CREATE KEYSPACE {ks} WITH REPLICATION = {{'class': 'NetworkTopologyStrategy', 'replication_factor': 1}}" + ); if scylla_supports_tablets(&session).await { create_ks += " and TABLETS = { 'enabled': false}"; } @@ -573,7 +575,9 @@ async fn test_counter_batch() { // Need to disable tablets in this test because they don't support counters yet. // (https://github.com/scylladb/scylladb/commit/c70f321c6f581357afdf3fd8b4fe8e5c5bb9736e). - let mut create_ks = format!("CREATE KEYSPACE IF NOT EXISTS {ks} WITH REPLICATION = {{'class' : 'NetworkTopologyStrategy', 'replication_factor' : 1}}"); + let mut create_ks = format!( + "CREATE KEYSPACE IF NOT EXISTS {ks} WITH REPLICATION = {{'class' : 'NetworkTopologyStrategy', 'replication_factor' : 1}}" + ); if scylla_supports_tablets(&session).await { create_ks += " AND TABLETS = {'enabled': false}" } diff --git a/scylla/tests/integration/statements/consistency.rs b/scylla/tests/integration/statements/consistency.rs index 76e53af7f7..a0777693d0 100644 --- a/scylla/tests/integration/statements/consistency.rs +++ b/scylla/tests/integration/statements/consistency.rs @@ -1,4 +1,4 @@ -use crate::utils::{setup_tracing, test_with_3_node_cluster, unique_keyspace_name, PerformDDL}; +use crate::utils::{PerformDDL, setup_tracing, test_with_3_node_cluster, unique_keyspace_name}; use scylla::client::execution_profile::ExecutionProfile; use scylla::client::execution_profile::{ExecutionProfileBuilder, ExecutionProfileHandle}; use scylla::client::session::Session; @@ -7,13 +7,13 @@ use scylla::cluster::NodeRef; use scylla::policies::load_balancing::{DefaultPolicy, LoadBalancingPolicy, RoutingInfo}; use scylla::policies::retry::FallthroughRetryPolicy; use scylla::routing::{Shard, Token}; +use scylla::statement::SerialConsistency; use scylla::statement::batch::BatchStatement; use scylla::statement::batch::{Batch, BatchType}; use scylla::statement::prepared::PreparedStatement; use scylla::statement::unprepared::Statement; -use scylla::statement::SerialConsistency; -use scylla_cql::frame::response::result::TableSpec; use scylla_cql::Consistency; +use scylla_cql::frame::response::result::TableSpec; use scylla_proxy::ShardAwareness; use scylla_proxy::{ Condition, ProxyError, Reaction, RequestFrame, RequestOpcode, RequestReaction, RequestRule, diff --git a/scylla/tests/integration/statements/coordinator.rs b/scylla/tests/integration/statements/coordinator.rs index 3d066f3617..55f4c3e081 100644 --- a/scylla/tests/integration/statements/coordinator.rs +++ b/scylla/tests/integration/statements/coordinator.rs @@ -12,11 +12,11 @@ use scylla::policies::load_balancing::{NodeIdentifier, SingleTargetLoadBalancing use scylla::response::query_result::QueryResult; use scylla::response::{Coordinator, PagingState}; use scylla::routing::Shard; -use scylla::statement::batch::{Batch, BatchStatement, BatchType}; use scylla::statement::Statement; +use scylla::statement::batch::{Batch, BatchStatement, BatchType}; use uuid::Uuid; -use crate::utils::{create_new_session_builder, setup_tracing, unique_keyspace_name, PerformDDL}; +use crate::utils::{PerformDDL, create_new_session_builder, setup_tracing, unique_keyspace_name}; #[tokio::test] async fn test_enforce_request_coordinator() { diff --git a/scylla/tests/integration/statements/execution_profiles.rs b/scylla/tests/integration/statements/execution_profiles.rs index a0b345d344..692f283129 100644 --- a/scylla/tests/integration/statements/execution_profiles.rs +++ b/scylla/tests/integration/statements/execution_profiles.rs @@ -1,7 +1,7 @@ use std::ops::Deref; use std::sync::Arc; -use crate::utils::{setup_tracing, test_with_3_node_cluster, unique_keyspace_name, PerformDDL}; +use crate::utils::{PerformDDL, setup_tracing, test_with_3_node_cluster, unique_keyspace_name}; use assert_matches::assert_matches; use scylla::client::execution_profile::ExecutionProfile; use scylla::client::session_builder::SessionBuilder; @@ -11,9 +11,9 @@ use scylla::policies::load_balancing::{LoadBalancingPolicy, RoutingInfo}; use scylla::policies::retry::{RetryPolicy, RetrySession}; use scylla::policies::speculative_execution::SpeculativeExecutionPolicy; use scylla::routing::Shard; +use scylla::statement::SerialConsistency; use scylla::statement::batch::{Batch, BatchStatement, BatchType}; use scylla::statement::unprepared::Statement; -use scylla::statement::SerialConsistency; use scylla_cql::Consistency; use tokio::sync::mpsc; diff --git a/scylla/tests/integration/statements/named_bind_markers.rs b/scylla/tests/integration/statements/named_bind_markers.rs index 50e245d574..b65f094f01 100644 --- a/scylla/tests/integration/statements/named_bind_markers.rs +++ b/scylla/tests/integration/statements/named_bind_markers.rs @@ -1,5 +1,5 @@ use crate::utils::{ - create_new_session_builder, setup_tracing, unique_keyspace_name, PerformDDL as _, + PerformDDL as _, create_new_session_builder, setup_tracing, unique_keyspace_name, }; use std::collections::{BTreeMap, HashMap}; use std::vec; diff --git a/scylla/tests/integration/statements/prepared.rs b/scylla/tests/integration/statements/prepared.rs index 72aa5b4bad..69e74af827 100644 --- a/scylla/tests/integration/statements/prepared.rs +++ b/scylla/tests/integration/statements/prepared.rs @@ -6,11 +6,11 @@ use scylla::errors::{DbError, PrepareError, RequestAttemptError}; use scylla::frame::response::result::{ColumnSpec, TableSpec}; use scylla::policies::load_balancing::{NodeIdentifier, SingleTargetLoadBalancingPolicy}; use scylla::response::{PagingState, PagingStateResponse}; -use scylla::routing::partitioner::PartitionerName; use scylla::routing::Token; +use scylla::routing::partitioner::PartitionerName; use scylla::serialize::row::SerializeRow; -use scylla::statement::prepared::PreparedStatement; use scylla::statement::Statement; +use scylla::statement::prepared::PreparedStatement; use scylla_cql::frame::types; use scylla_proxy::{ Condition, ProxyError, Reaction, RequestFrame, RequestOpcode, RequestReaction, RequestRule, @@ -24,8 +24,8 @@ use tracing::{debug, info}; use uuid::Uuid; use crate::utils::{ - create_new_session_builder, scylla_supports_tablets, setup_tracing, test_with_3_node_cluster, - unique_keyspace_name, PerformDDL as _, + PerformDDL as _, create_new_session_builder, scylla_supports_tablets, setup_tracing, + test_with_3_node_cluster, unique_keyspace_name, }; #[tokio::test] @@ -226,7 +226,8 @@ async fn test_prepared_partitioner() { // This test uses CDC which is not yet compatible with Scylla's tablets. let mut create_ks = format!( - "CREATE KEYSPACE IF NOT EXISTS {ks} WITH REPLICATION = {{'class' : 'NetworkTopologyStrategy', 'replication_factor' : 1}}"); + "CREATE KEYSPACE IF NOT EXISTS {ks} WITH REPLICATION = {{'class' : 'NetworkTopologyStrategy', 'replication_factor' : 1}}" + ); if scylla_supports_tablets(&session).await { create_ks += " AND TABLETS = {'enabled': false}" } diff --git a/scylla/tests/integration/statements/timestamps.rs b/scylla/tests/integration/statements/timestamps.rs index c1cb2d134e..261f13b939 100644 --- a/scylla/tests/integration/statements/timestamps.rs +++ b/scylla/tests/integration/statements/timestamps.rs @@ -7,13 +7,13 @@ use rand::random; use scylla::{ policies::timestamp_generator::TimestampGenerator, statement::{ - batch::{Batch, BatchType}, Statement, + batch::{Batch, BatchType}, }, }; use crate::utils::{ - create_new_session_builder, setup_tracing, unique_keyspace_name, PerformDDL as _, + PerformDDL as _, create_new_session_builder, setup_tracing, unique_keyspace_name, }; #[tokio::test] @@ -190,11 +190,13 @@ async fn test_timestamp_generator() { { let timestamps_locked = timestamps.lock().unwrap(); - assert!(query_rows_result - .rows::<(i32, i32, i64)>() - .unwrap() - .map(|row_result| row_result.unwrap()) - .all(|(_a, _b, writetime)| timestamps_locked.contains(&writetime))); + assert!( + query_rows_result + .rows::<(i32, i32, i64)>() + .unwrap() + .map(|row_result| row_result.unwrap()) + .all(|(_a, _b, writetime)| timestamps_locked.contains(&writetime)) + ); } session.ddl(format!("DROP KEYSPACE {ks}")).await.unwrap(); diff --git a/scylla/tests/integration/statements/transparent_reprepare.rs b/scylla/tests/integration/statements/transparent_reprepare.rs index c366cd0a9e..3f801e5ad4 100644 --- a/scylla/tests/integration/statements/transparent_reprepare.rs +++ b/scylla/tests/integration/statements/transparent_reprepare.rs @@ -4,7 +4,7 @@ use scylla::{ }; use crate::utils::{ - create_new_session_builder, setup_tracing, unique_keyspace_name, PerformDDL as _, + PerformDDL as _, create_new_session_builder, setup_tracing, unique_keyspace_name, }; async fn rename(session: &Session, rename_str: &str) { @@ -57,15 +57,19 @@ async fn test_unprepared_reprepare_in_execute() { rename(&session, "b TO tmp_name").await; // During rename the query should fail - assert!(session - .execute_unpaged(&insert_a_b_c, (1, 2, 3)) - .await - .is_err()); + assert!( + session + .execute_unpaged(&insert_a_b_c, (1, 2, 3)) + .await + .is_err() + ); rename(&session, "c TO b").await; - assert!(session - .execute_unpaged(&insert_a_b_c, (1, 2, 3)) - .await - .is_err()); + assert!( + session + .execute_unpaged(&insert_a_b_c, (1, 2, 3)) + .await + .is_err() + ); rename(&session, "tmp_name TO c").await; // Insert values again (b and c are swapped so those are different inserts) @@ -190,15 +194,19 @@ async fn test_unprepared_reprepare_in_caching_session_execute() { rename_caching(&caching_session, "b TO tmp_name").await; // During rename the query should fail - assert!(caching_session - .execute_unpaged(insert_a_b_c, &(1, 2, 3)) - .await - .is_err()); + assert!( + caching_session + .execute_unpaged(insert_a_b_c, &(1, 2, 3)) + .await + .is_err() + ); rename_caching(&caching_session, "c TO b").await; - assert!(caching_session - .execute_unpaged(insert_a_b_c, &(1, 2, 3)) - .await - .is_err()); + assert!( + caching_session + .execute_unpaged(insert_a_b_c, &(1, 2, 3)) + .await + .is_err() + ); rename_caching(&caching_session, "tmp_name TO c").await; // Insert values again (b and c are swapped so those are different inserts) diff --git a/scylla/tests/integration/statements/unprepared.rs b/scylla/tests/integration/statements/unprepared.rs index 804c3caec8..fa1b232e84 100644 --- a/scylla/tests/integration/statements/unprepared.rs +++ b/scylla/tests/integration/statements/unprepared.rs @@ -1,6 +1,6 @@ use crate::utils::{ - create_new_session_builder, setup_tracing, test_with_3_node_cluster, unique_keyspace_name, - PerformDDL as _, + PerformDDL as _, create_new_session_builder, setup_tracing, test_with_3_node_cluster, + unique_keyspace_name, }; use scylla::client::session::Session; use scylla::client::session_builder::SessionBuilder; diff --git a/scylla/tests/integration/types/cql_collections.rs b/scylla/tests/integration/types/cql_collections.rs index c3d62a0d85..b4a556d892 100644 --- a/scylla/tests/integration/types/cql_collections.rs +++ b/scylla/tests/integration/types/cql_collections.rs @@ -1,6 +1,6 @@ use crate::utils::{ - create_new_session_builder, setup_tracing, unique_keyspace_name, DeserializeOwnedValue, - PerformDDL, + DeserializeOwnedValue, PerformDDL, create_new_session_builder, setup_tracing, + unique_keyspace_name, }; use scylla::cluster::metadata::NativeType; use scylla::deserialize::value::DeserializeValue; diff --git a/scylla/tests/integration/types/cql_types.rs b/scylla/tests/integration/types/cql_types.rs index 4e15f70998..1aefe266f7 100644 --- a/scylla/tests/integration/types/cql_types.rs +++ b/scylla/tests/integration/types/cql_types.rs @@ -9,8 +9,8 @@ use std::net::{IpAddr, Ipv4Addr, Ipv6Addr}; use std::str::FromStr; use crate::utils::{ - create_new_session_builder, scylla_supports_tablets, setup_tracing, unique_keyspace_name, - DeserializeOwnedValue, PerformDDL, + DeserializeOwnedValue, PerformDDL, create_new_session_builder, scylla_supports_tablets, + setup_tracing, unique_keyspace_name, }; // Used to prepare a table for test diff --git a/scylla/tests/integration/types/cql_value.rs b/scylla/tests/integration/types/cql_value.rs index dde9dc9431..c7f826c825 100644 --- a/scylla/tests/integration/types/cql_value.rs +++ b/scylla/tests/integration/types/cql_value.rs @@ -3,7 +3,7 @@ use assert_matches::assert_matches; use scylla::client::session::Session; use scylla::value::{CqlDuration, CqlValue}; -use crate::utils::{create_new_session_builder, setup_tracing, unique_keyspace_name, PerformDDL}; +use crate::utils::{PerformDDL, create_new_session_builder, setup_tracing, unique_keyspace_name}; #[tokio::test] async fn test_cqlvalue_udt() { diff --git a/scylla/tests/integration/utils.rs b/scylla/tests/integration/utils.rs index 2b9c1101b5..64496d49de 100644 --- a/scylla/tests/integration/utils.rs +++ b/scylla/tests/integration/utils.rs @@ -1,5 +1,5 @@ -use futures::future::try_join_all; use futures::Future; +use futures::future::try_join_all; use itertools::Either; use scylla::client::caching_session::CachingSession; use scylla::client::execution_profile::ExecutionProfile; @@ -24,13 +24,13 @@ use std::net::{IpAddr, SocketAddr}; use std::num::NonZeroU32; use std::process::Command; use std::str::FromStr; -use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::Arc; +use std::sync::atomic::{AtomicUsize, Ordering}; use std::time::{Duration, SystemTime, UNIX_EPOCH}; use tracing::{error, warn}; +use tracing_subscriber::Layer; use tracing_subscriber::layer::SubscriberExt; use tracing_subscriber::util::SubscriberInitExt; -use tracing_subscriber::Layer; use uuid::Uuid; use scylla_proxy::{Node, Proxy, ProxyError, RunningProxy, ShardAwareness}; @@ -274,10 +274,15 @@ impl RetrySession for SchemaQueriesRetrySession { // In this case we really should do something about it in the // core, because it is absurd for DDL queries to fail this often. if self.count >= 10 { - error!("Received TENTH(!) group 0 concurrent modification error during DDL. Please fix Scylla Core."); + error!( + "Received TENTH(!) group 0 concurrent modification error during DDL. Please fix Scylla Core." + ); RetryDecision::DontRetry } else { - warn!("Received group 0 concurrent modification error during DDL. Performing retry #{}.", self.count); + warn!( + "Received group 0 concurrent modification error during DDL. Performing retry #{}.", + self.count + ); RetryDecision::RetrySameTarget(None) } } diff --git a/utils/src/bin/find_stale_test_keyspaces.rs b/utils/src/bin/find_stale_test_keyspaces.rs index db39641bd8..ace20eed68 100644 --- a/utils/src/bin/find_stale_test_keyspaces.rs +++ b/utils/src/bin/find_stale_test_keyspaces.rs @@ -1,4 +1,4 @@ -use futures::{stream, StreamExt}; +use futures::{StreamExt, stream}; use scylla::client::session::Session; use scylla::client::session_builder::SessionBuilder; From da94698856a4bc858cdcbb9724f788dfa904d679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Tue, 12 Aug 2025 22:08:57 +0200 Subject: [PATCH 16/19] Move to resolver v3 This resolver is MSRV-aware which should remove the need for our Cargo.lock.msrv file. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7d2c0341fe..b66a93dcfa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,4 +7,4 @@ members = [ "scylla-proxy", "utils", ] -resolver = "2" +resolver = "3" From e68341ad25b96aa662ee0b2ebf88d29b758778b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Tue, 12 Aug 2025 22:11:44 +0200 Subject: [PATCH 17/19] Remove Cargo.lock.msrv It should not be needed anymore. --- .github/workflows/rust.yml | 8 +- CONTRIBUTING.md | 32 - Cargo.lock.msrv | 2966 ------------------------------------ MAINTENANCE.md | 1 - 4 files changed, 3 insertions(+), 3004 deletions(-) delete mode 100644 Cargo.lock.msrv diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 959e301886..2884d30eea 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -122,14 +122,12 @@ jobs: toolchain: ${{ env.rust_min }} - name: Print Rust version run: rustc --version - - name: Use MSRV Cargo.lock - run: mv Cargo.lock.msrv Cargo.lock - name: MSRV cargo check with features - run: cargo check --all-targets --all-features --locked + run: cargo check --all-targets --all-features - name: MSRV cargo check without features - run: cargo check --all-targets --locked -p scylla + run: cargo check --all-targets -p scylla - name: MSRV cargo check scylla-cql - run: cargo check --all-targets --locked -p scylla-cql + run: cargo check --all-targets -p scylla-cql # Tests that docstrings generate docs without warnings cargo_docs: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 73e024846b..24a39f65cd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -78,38 +78,6 @@ simply add the call at the beginning of the test. Before sending a pull request, it is a good idea to run `make ci` locally (or `make dockerized-ci` if on macOS). It will perform a format check, `cargo check`, linter check (clippy), build and `cargo test`. -### min_rust workflow and Cargo.lock.msrv - -There is min_rust job defined in rust.yml workflow that checks if the driver compiles with our current MSRV. -Bumping MSRV is generally not considered a breaking change, so our dependencies are free to do it, -and do it regularly. This resulted in failures in this job. -We could pin versions of problematic crates in `Cargo.toml`, but it would affect version selection -for client applications. It would also force people that use non-ancient versions of Rust to use older -versions of dependencies, which is not desirable. - -We opted for a different approach. There is `Cargo.lock.msrv` file in repository, which is used only by min_rust job - -it is renamed to `Cargo.lock` before building the driver with `--locked` flag. - -This solution is good for us (because we don't have to fix breakage so often) and for users of the driver on modern versions -of Rust - for them the driver will just work. -Users on old versions of Rust will potentially have to pin indirect dependencies to specific versions - but that shouldn't be -that much of a problem, it's just few `cargo update` commands. - -If your PR added / removed / updated a dependency, you will need to also update `Cargo.lock.msrv` file. -There are a few scenarios: - - If you just bumped version of one of crates in the workspace: rename `Cargo.lock.msrv` to `Cargo.lock`, - run `cargo check --all-targets --all-features --offline`, rename the file back. - - If you added / removed / updated dependency in one of `Cargo.toml` files it should be enough to - rename `Cargo.lock.msrv` to `Cargo.lock`, run `cargo check --all-targets --all-features` - and rename the file back. - - If previous methods didn't work or you want to recreate the file (which we should do once in a while): - 1. Switch to MSRV version (e.g. `rustup install && rustup default `). Check `README.md` file for current MSRV. - 2. Remove your `Cargo.lock` - 3. Run `cargo check --all-targets --all-features` - 4. If you got an error about one of dependencies not working with this version of Rust, update it's version in `Cargo.lock`, - using command like `cargo update -p toml_datetime --precise 0.6.3` and go back to step 3. - 5. Rename `Cargo.lock` to `Cargo.lock.msrv`. - ### Semver checking Our CI runs cargo semver-checks and labels PRs that introduce breaking changes. diff --git a/Cargo.lock.msrv b/Cargo.lock.msrv deleted file mode 100644 index 6557b26efa..0000000000 --- a/Cargo.lock.msrv +++ /dev/null @@ -1,2966 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler2" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "allocator-api2" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anes" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" - -[[package]] -name = "anstream" -version = "0.6.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ae563653d1938f79b1ab1b5e668c87c76a9930414574a6583a7b7e11a8e6192" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" - -[[package]] -name = "anstyle-parse" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" -dependencies = [ - "windows-sys 0.60.2", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" -dependencies = [ - "anstyle", - "once_cell_polyfill", - "windows-sys 0.60.2", -] - -[[package]] -name = "anyhow" -version = "1.0.99" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" - -[[package]] -name = "arc-swap" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" - -[[package]] -name = "assert_matches" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" - -[[package]] -name = "async-trait" -version = "0.1.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] - -[[package]] -name = "atomic" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89cbf775b137e9b968e67227ef7f775587cde3fd31b0d8599dbd0f598a48340" -dependencies = [ - "bytemuck", -] - -[[package]] -name = "autocfg" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" - -[[package]] -name = "aws-lc-rs" -version = "1.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c953fe1ba023e6b7730c0d4b031d06f267f23a46167dcbd40316644b10a17ba" -dependencies = [ - "aws-lc-sys", - "zeroize", -] - -[[package]] -name = "aws-lc-sys" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbfd150b5dbdb988bcc8fb1fe787eb6b7ee6180ca24da683b61ea5405f3d43ff" -dependencies = [ - "bindgen", - "cc", - "cmake", - "dunce", - "fs_extra", -] - -[[package]] -name = "backtrace" -version = "0.3.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets 0.52.6", -] - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "bigdecimal" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a22f228ab7a1b23027ccc6c350b72868017af7ea8356fbdf19f8d991c690013" -dependencies = [ - "autocfg", - "libm", - "num-bigint 0.4.6", - "num-integer", - "num-traits", -] - -[[package]] -name = "bindgen" -version = "0.69.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" -dependencies = [ - "bitflags", - "cexpr", - "clang-sys", - "itertools 0.12.1", - "lazy_static", - "lazycell", - "log", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.104", - "which", -] - -[[package]] -name = "bitflags" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" - -[[package]] -name = "bumpalo" -version = "3.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" - -[[package]] -name = "bytemuck" -version = "1.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3995eaeebcdf32f91f980d360f78732ddc061097ab4e39991ae7a6ace9194677" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" - -[[package]] -name = "cast" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" - -[[package]] -name = "cc" -version = "1.2.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2352e5597e9c544d5e6d9c95190d5d27738ade584fa8db0a16e130e5c2b5296e" -dependencies = [ - "jobserver", - "libc", - "shlex", -] - -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - -[[package]] -name = "cfg-if" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" - -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - -[[package]] -name = "chrono" -version = "0.4.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "num-traits", - "windows-link", -] - -[[package]] -name = "ciborium" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" -dependencies = [ - "ciborium-io", - "ciborium-ll", - "serde", -] - -[[package]] -name = "ciborium-io" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" - -[[package]] -name = "ciborium-ll" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" -dependencies = [ - "ciborium-io", - "half", -] - -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading", -] - -[[package]] -name = "clap" -version = "4.5.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c1f056bae57e3e54c3375c41ff79619ddd13460a17d7438712bd0d83fda4ff8" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e7f4214277f3c7aa526a59dd3fbe306a370daee1f8b7b8c987069cd8e888a8" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.5.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef4f52386a59ca4c860f7393bcf8abd8dfd91ecccc0f774635ff68e92eeef491" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.104", -] - -[[package]] -name = "clap_lex" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" - -[[package]] -name = "clipboard-win" -version = "5.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde03770d3df201d4fb868f2c9c59e66a3e4e2bd06692a0fe701e7103c7e84d4" -dependencies = [ - "error-code", -] - -[[package]] -name = "cmake" -version = "0.1.54" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0" -dependencies = [ - "cc", -] - -[[package]] -name = "colorchoice" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "criterion" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bf7af66b0989381bd0be551bd7cc91912a655a58c6918420c9527b1fd8b4679" -dependencies = [ - "anes", - "cast", - "ciborium", - "clap", - "criterion-plot", - "itertools 0.13.0", - "num-traits", - "oorandom", - "plotters", - "rayon", - "regex", - "serde", - "serde_json", - "tinytemplate", - "walkdir", -] - -[[package]] -name = "criterion-plot" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" -dependencies = [ - "cast", - "itertools 0.10.5", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - -[[package]] -name = "crunchy" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" - -[[package]] -name = "darling" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.104", -] - -[[package]] -name = "darling_macro" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" -dependencies = [ - "darling_core", - "quote", - "syn 2.0.104", -] - -[[package]] -name = "dashmap" -version = "6.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" -dependencies = [ - "cfg-if", - "crossbeam-utils", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core", -] - -[[package]] -name = "deranged" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" -dependencies = [ - "powerfmt", -] - -[[package]] -name = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] - -[[package]] -name = "dunce" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" - -[[package]] -name = "either" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" - -[[package]] -name = "endian-type" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" - -[[package]] -name = "env_filter" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" -dependencies = [ - "log", - "regex", -] - -[[package]] -name = "env_logger" -version = "0.11.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" -dependencies = [ - "anstream", - "anstyle", - "env_filter", - "jiff", - "log", -] - -[[package]] -name = "equivalent" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - -[[package]] -name = "errno" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" -dependencies = [ - "libc", - "windows-sys 0.60.2", -] - -[[package]] -name = "error-code" -version = "3.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dea2df4cf52843e0452895c455a1a2cfbb842a1e7329671acf418fdc53ed4c59" - -[[package]] -name = "examples" -version = "0.0.0" -dependencies = [ - "anyhow", - "chrono", - "clap", - "env_logger", - "futures", - "openssl", - "rand", - "rustls", - "rustyline", - "rustyline-derive", - "scylla", - "stats_alloc", - "time", - "tokio", - "tower", - "tracing", - "tracing-subscriber", - "uuid", -] - -[[package]] -name = "fastrand" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" - -[[package]] -name = "fd-lock" -version = "4.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78" -dependencies = [ - "cfg-if", - "rustix 1.0.8", - "windows-sys 0.59.0", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foldhash" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "fs_extra" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" - -[[package]] -name = "futures" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-executor" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" - -[[package]] -name = "futures-macro" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] - -[[package]] -name = "futures-sink" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" - -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "getrandom" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.11.1+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" -dependencies = [ - "cfg-if", - "libc", - "r-efi", - "wasi 0.14.2+wasi-0.2.4", -] - -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - -[[package]] -name = "glob" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" - -[[package]] -name = "half" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9" -dependencies = [ - "cfg-if", - "crunchy", -] - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" - -[[package]] -name = "hashbrown" -version = "0.15.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" -dependencies = [ - "allocator-api2", - "equivalent", - "foldhash", -] - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "histogram" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95aebe0dec9a429e3207e5e34d97f2a7d1064d5ee6d8ed13ce0a26456de000ae" -dependencies = [ - "thiserror 1.0.69", -] - -[[package]] -name = "home" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "log", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "icu_collections" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" -dependencies = [ - "displaydoc", - "potential_utf", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locale_core" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_normalizer" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" - -[[package]] -name = "icu_properties" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_locale_core", - "icu_properties_data", - "icu_provider", - "potential_utf", - "zerotrie", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" - -[[package]] -name = "icu_provider" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" -dependencies = [ - "displaydoc", - "icu_locale_core", - "stable_deref_trait", - "tinystr", - "writeable", - "yoke", - "zerofrom", - "zerotrie", - "zerovec", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "idna" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" -dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" -dependencies = [ - "icu_normalizer", - "icu_properties", -] - -[[package]] -name = "indexmap" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" -dependencies = [ - "equivalent", - "hashbrown 0.15.5", -] - -[[package]] -name = "io-uring" -version = "0.7.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" -dependencies = [ - "bitflags", - "cfg-if", - "libc", -] - -[[package]] -name = "is_terminal_polyfill" -version = "1.70.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" - -[[package]] -name = "jiff" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be1f93b8b1eb69c77f24bbb0afdf66f54b632ee39af40ca21c4365a1d7347e49" -dependencies = [ - "jiff-static", - "log", - "portable-atomic", - "portable-atomic-util", - "serde", -] - -[[package]] -name = "jiff-static" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03343451ff899767262ec32146f6d559dd759fdadf42ff0e227c7c48f72594b4" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] - -[[package]] -name = "jobserver" -version = "0.1.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" -dependencies = [ - "getrandom 0.3.3", - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" -dependencies = [ - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - -[[package]] -name = "libc" -version = "0.2.175" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" - -[[package]] -name = "libloading" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" -dependencies = [ - "cfg-if", - "windows-targets 0.53.3", -] - -[[package]] -name = "libm" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" - -[[package]] -name = "linux-raw-sys" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" - -[[package]] -name = "linux-raw-sys" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" - -[[package]] -name = "litemap" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" - -[[package]] -name = "lock_api" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" - -[[package]] -name = "lz4_flex" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08ab2867e3eeeca90e844d1940eab391c9dc5228783db2ed999acbc0a9ed375a" -dependencies = [ - "twox-hash", -] - -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata 0.1.10", -] - -[[package]] -name = "memchr" -version = "2.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" -dependencies = [ - "adler2", -] - -[[package]] -name = "mio" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" -dependencies = [ - "libc", - "wasi 0.11.1+wasi-snapshot-preview1", - "windows-sys 0.59.0", -] - -[[package]] -name = "nibble_vec" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" -dependencies = [ - "smallvec", -] - -[[package]] -name = "nix" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" -dependencies = [ - "bitflags", - "cfg-if", - "cfg_aliases", - "libc", -] - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "ntest" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb183f0a1da7a937f672e5ee7b7edb727bf52b8a52d531374ba8ebb9345c0330" -dependencies = [ - "ntest_test_cases", - "ntest_timeout", -] - -[[package]] -name = "ntest_test_cases" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16d0d3f2a488592e5368ebbe996e7f1d44aa13156efad201f5b4d84e150eaa93" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ntest_timeout" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc7c92f190c97f79b4a332f5e81dcf68c8420af2045c936c9be0bc9de6f63b5" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - -[[package]] -name = "num-bigint" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", -] - -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "object" -version = "0.36.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" - -[[package]] -name = "once_cell_polyfill" -version = "1.70.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" - -[[package]] -name = "oorandom" -version = "11.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" - -[[package]] -name = "openssl" -version = "0.10.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" -dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] - -[[package]] -name = "openssl-sys" -version = "0.9.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - -[[package]] -name = "parking_lot" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets 0.52.6", -] - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pin-project-lite" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" - -[[package]] -name = "plotters" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" -dependencies = [ - "num-traits", - "plotters-backend", - "plotters-svg", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "plotters-backend" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" - -[[package]] -name = "plotters-svg" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" -dependencies = [ - "plotters-backend", -] - -[[package]] -name = "portable-atomic" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" - -[[package]] -name = "portable-atomic-util" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" -dependencies = [ - "portable-atomic", -] - -[[package]] -name = "potential_utf" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" -dependencies = [ - "zerovec", -] - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[package]] -name = "ppv-lite86" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "prettyplease" -version = "0.2.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff24dfcda44452b9816fff4cd4227e1bb73ff5a2f1bc1105aa92fb8565ce44d2" -dependencies = [ - "proc-macro2", - "syn 2.0.104", -] - -[[package]] -name = "proc-macro-crate" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" -dependencies = [ - "toml_edit", -] - -[[package]] -name = "proc-macro2" -version = "1.0.97" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61789d7719defeb74ea5fe81f2fdfdbd28a803847077cecce2ff14e1472f6f1" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "r-efi" -version = "5.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" - -[[package]] -name = "radix_trie" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" -dependencies = [ - "endian-type", - "nibble_vec", -] - -[[package]] -name = "rand" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" -dependencies = [ - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" -dependencies = [ - "getrandom 0.3.3", -] - -[[package]] -name = "rand_pcg" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b48ac3f7ffaab7fac4d2376632268aa5f89abdb55f7ebf8f4d11fffccb2320f7" -dependencies = [ - "rand_core", -] - -[[package]] -name = "rayon" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - -[[package]] -name = "redox_syscall" -version = "0.5.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" -dependencies = [ - "bitflags", -] - -[[package]] -name = "regex" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", -] - -[[package]] -name = "regex-automata" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] -name = "ring" -version = "0.17.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" -dependencies = [ - "cc", - "cfg-if", - "getrandom 0.2.16", - "libc", - "untrusted", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustix" -version = "0.38.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustix" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys 0.9.4", - "windows-sys 0.60.2", -] - -[[package]] -name = "rustls" -version = "0.23.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc" -dependencies = [ - "aws-lc-rs", - "log", - "once_cell", - "rustls-pki-types", - "rustls-webpki", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-pki-types" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" -dependencies = [ - "zeroize", -] - -[[package]] -name = "rustls-webpki" -version = "0.103.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc" -dependencies = [ - "aws-lc-rs", - "ring", - "rustls-pki-types", - "untrusted", -] - -[[package]] -name = "rustversion" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" - -[[package]] -name = "rustyline" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62fd9ca5ebc709e8535e8ef7c658eb51457987e48c98ead2be482172accc408d" -dependencies = [ - "bitflags", - "cfg-if", - "clipboard-win", - "fd-lock", - "home", - "libc", - "log", - "memchr", - "nix", - "radix_trie", - "unicode-segmentation", - "unicode-width", - "utf8parse", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustyline-derive" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d66de233f908aebf9cc30ac75ef9103185b4b715c6f2fb7a626aa5e5ede53ab" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] - -[[package]] -name = "ryu" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "scylla" -version = "1.3.1" -dependencies = [ - "anyhow", - "arc-swap", - "assert_matches", - "async-trait", - "base64", - "bigdecimal", - "bytes", - "chrono", - "criterion", - "dashmap", - "futures", - "hashbrown 0.15.5", - "histogram", - "itertools 0.14.0", - "ntest", - "num-bigint 0.3.3", - "num-bigint 0.4.6", - "openssl", - "rand", - "rand_chacha", - "rand_pcg", - "rustls", - "scylla-cql", - "scylla-proxy", - "serde", - "serde_yaml", - "smallvec", - "socket2 0.5.10", - "tempfile", - "thiserror 2.0.14", - "time", - "tokio", - "tokio-openssl", - "tokio-rustls", - "tracing", - "tracing-subscriber", - "url", - "uuid", -] - -[[package]] -name = "scylla-cql" -version = "1.3.1" -dependencies = [ - "assert_matches", - "bigdecimal", - "byteorder", - "bytes", - "chrono", - "criterion", - "itertools 0.14.0", - "lz4_flex", - "num-bigint 0.3.3", - "num-bigint 0.4.6", - "scylla-macros", - "secrecy", - "serde", - "snap", - "stable_deref_trait", - "thiserror 2.0.14", - "time", - "tokio", - "uuid", - "yoke", -] - -[[package]] -name = "scylla-macros" -version = "1.3.1" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "scylla", - "scylla-cql", - "syn 2.0.104", -] - -[[package]] -name = "scylla-proxy" -version = "0.0.4" -dependencies = [ - "assert_matches", - "bigdecimal", - "byteorder", - "bytes", - "chrono", - "futures", - "ntest", - "num-bigint 0.3.3", - "rand", - "scylla-cql", - "thiserror 2.0.14", - "tokio", - "tracing", - "tracing-subscriber", - "uuid", -] - -[[package]] -name = "secrecy" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" -dependencies = [ - "zeroize", -] - -[[package]] -name = "serde" -version = "1.0.219" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.219" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] - -[[package]] -name = "serde_json" -version = "1.0.142" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] - -[[package]] -name = "serde_yaml" -version = "0.9.34+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" -dependencies = [ - "indexmap", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "signal-hook-registry" -version = "1.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" -dependencies = [ - "libc", -] - -[[package]] -name = "slab" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" - -[[package]] -name = "smallvec" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" - -[[package]] -name = "snap" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" - -[[package]] -name = "socket2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "socket2" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" -dependencies = [ - "libc", - "windows-sys 0.59.0", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "stats_alloc" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c0e04424e733e69714ca1bbb9204c1a57f09f5493439520f9f68c132ad25eec" - -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "synstructure" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] - -[[package]] -name = "tempfile" -version = "3.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" -dependencies = [ - "fastrand", - "getrandom 0.3.3", - "once_cell", - "rustix 1.0.8", - "windows-sys 0.59.0", -] - -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - -[[package]] -name = "thiserror" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b0949c3a6c842cbde3f1686d6eea5a010516deb7085f79db747562d4102f41e" -dependencies = [ - "thiserror-impl 2.0.14", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc5b44b4ab9c2fdd0e0512e6bece8388e214c0749f5862b114cc5b7a25daf227" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] - -[[package]] -name = "thread_local" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "time" -version = "0.3.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" -dependencies = [ - "deranged", - "num-conv", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" - -[[package]] -name = "time-macros" -version = "0.2.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" -dependencies = [ - "num-conv", - "time-core", -] - -[[package]] -name = "tinystr" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" -dependencies = [ - "displaydoc", - "zerovec", -] - -[[package]] -name = "tinytemplate" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" -dependencies = [ - "serde", - "serde_json", -] - -[[package]] -name = "tokio" -version = "1.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" -dependencies = [ - "backtrace", - "bytes", - "io-uring", - "libc", - "mio", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "slab", - "socket2 0.6.0", - "tokio-macros", - "windows-sys 0.59.0", -] - -[[package]] -name = "tokio-macros" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] - -[[package]] -name = "tokio-openssl" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59df6849caa43bb7567f9a36f863c447d95a11d5903c9cc334ba32576a27eadd" -dependencies = [ - "openssl", - "openssl-sys", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.26.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" -dependencies = [ - "rustls", - "tokio", -] - -[[package]] -name = "toml_datetime" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" - -[[package]] -name = "toml_edit" -version = "0.22.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tower" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" -dependencies = [ - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-layer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" - -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" - -[[package]] -name = "tracing" -version = "0.1.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" -dependencies = [ - "log", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] - -[[package]] -name = "tracing-core" -version = "0.1.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" -dependencies = [ - "once_cell", - "valuable", -] - -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", -] - -[[package]] -name = "twox-hash" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b907da542cbced5261bd3256de1b3a1bf340a3d37f93425a07362a1d687de56" - -[[package]] -name = "unicode-ident" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" - -[[package]] -name = "unicode-segmentation" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" - -[[package]] -name = "unicode-width" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" - -[[package]] -name = "unsafe-libyaml" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "url" -version = "2.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - -[[package]] -name = "utf8parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - -[[package]] -name = "utils" -version = "0.0.0" -dependencies = [ - "futures", - "scylla", - "tokio", -] - -[[package]] -name = "uuid" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f33196643e165781c20a5ead5582283a7dacbb87855d867fbc2df3f81eddc1be" -dependencies = [ - "atomic", - "getrandom 0.3.3", - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "valuable" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "wasi" -version = "0.11.1+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" - -[[package]] -name = "wasi" -version = "0.14.2+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" -dependencies = [ - "wit-bindgen-rt", -] - -[[package]] -name = "wasm-bindgen" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn 2.0.104", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "web-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix 0.38.44", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-core" -version = "0.61.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-link", - "windows-result", - "windows-strings", -] - -[[package]] -name = "windows-implement" -version = "0.60.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] - -[[package]] -name = "windows-interface" -version = "0.59.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] - -[[package]] -name = "windows-link" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" - -[[package]] -name = "windows-result" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-strings" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" -dependencies = [ - "windows-targets 0.53.3", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.53.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" -dependencies = [ - "windows-link", - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_i686_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" - -[[package]] -name = "winnow" -version = "0.7.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" -dependencies = [ - "memchr", -] - -[[package]] -name = "wit-bindgen-rt" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags", -] - -[[package]] -name = "writeable" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" - -[[package]] -name = "yoke" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" -dependencies = [ - "serde", - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", - "synstructure", -] - -[[package]] -name = "zerocopy" -version = "0.8.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] - -[[package]] -name = "zerofrom" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", - "synstructure", -] - -[[package]] -name = "zeroize" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" - -[[package]] -name = "zerotrie" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", -] - -[[package]] -name = "zerovec" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] diff --git a/MAINTENANCE.md b/MAINTENANCE.md index 900aa72a11..a3fd6c340c 100644 --- a/MAINTENANCE.md +++ b/MAINTENANCE.md @@ -132,7 +132,6 @@ Commits that update `scylla-proxy` / `scylla-macros` / `scylla-cql` change: - `version` field in relevant `Cargo.toml` - Version number in crates that depend on given crate (so a commit bumping `scylla-macros` will also change version of `scylla-macros` in `scylla` and `scylla-cql` crates). -- Version number of the crate in `Cargo.lock.msrv` Additionally the last commit (which bumps `scylla` crate version) changes: - `docs/pyproject.toml` and `docs/source/conf.py`, as described in "Documentation" section. From f85b21633a68057a2271d1de0f543bf8f4d9c76c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Tue, 12 Aug 2025 22:23:26 +0200 Subject: [PATCH 18/19] CCM: Use AsyncFn(/Mut/Once) traits This simplifies the code, removing the need for locking. --- scylla/tests/integration/ccm/authenticate.rs | 16 +++++--------- scylla/tests/integration/ccm/example.rs | 6 +---- scylla/tests/integration/ccm/lib/mod.rs | 23 ++++++++------------ 3 files changed, 15 insertions(+), 30 deletions(-) diff --git a/scylla/tests/integration/ccm/authenticate.rs b/scylla/tests/integration/ccm/authenticate.rs index 0e988f98dd..5deb15a698 100644 --- a/scylla/tests/integration/ccm/authenticate.rs +++ b/scylla/tests/integration/ccm/authenticate.rs @@ -4,7 +4,6 @@ use async_trait::async_trait; use bytes::{BufMut, BytesMut}; use scylla::authentication::{AuthenticatorProvider, AuthenticatorSession}; use scylla::errors::AuthError; -use tokio::sync::Mutex; use crate::ccm::lib::cluster::{Cluster, ClusterOptions}; use crate::ccm::lib::{CLUSTER_VERSION, run_ccm_test_with_configuration}; @@ -19,14 +18,13 @@ fn cluster_1_node() -> ClusterOptions { } } -async fn run_ccm_auth_test_cluster_one_node(test: T) +async fn run_ccm_auth_test_cluster_one_node(test: T) where - T: FnOnce(Arc>) -> TFut, - TFut: std::future::Future, + T: AsyncFnOnce(&mut Cluster) -> (), { run_ccm_test_with_configuration( cluster_1_node, - |mut cluster| async move { + |mut cluster: Cluster| async move { cluster .enable_password_authentication() .await @@ -42,9 +40,7 @@ where #[cfg_attr(not(ccm_tests), ignore)] async fn authenticate_superuser_cluster_one_node() { setup_tracing(); - async fn test(cluster: Arc>) { - let cluster = cluster.lock().await; - + async fn test(cluster: &mut Cluster) { tracing::info!( "Connecting to {:?} with cassandra superuser...", cluster.nodes().get_contact_endpoints().await @@ -107,9 +103,7 @@ impl AuthenticatorProvider for CustomAuthenticatorProvider { #[cfg_attr(not(ccm_tests), ignore)] async fn custom_authentication_cluster_one_node() { setup_tracing(); - async fn test(cluster: Arc>) { - let cluster = cluster.lock().await; - + async fn test(cluster: &mut Cluster) { tracing::info!( "Connecting to {:?} with custom authenticator as cassandra superuser...", cluster.nodes().get_contact_endpoints().await diff --git a/scylla/tests/integration/ccm/example.rs b/scylla/tests/integration/ccm/example.rs index a4b615aca1..66539f3eb0 100644 --- a/scylla/tests/integration/ccm/example.rs +++ b/scylla/tests/integration/ccm/example.rs @@ -1,10 +1,7 @@ -use std::sync::Arc; - use crate::ccm::lib::cluster::{Cluster, ClusterOptions}; use crate::ccm::lib::{CLUSTER_VERSION, run_ccm_test}; use crate::utils::setup_tracing; -use tokio::sync::Mutex; use tracing::debug; fn cluster_1_node() -> ClusterOptions { @@ -20,8 +17,7 @@ fn cluster_1_node() -> ClusterOptions { #[cfg_attr(not(ccm_tests), ignore)] async fn test_cluster_lifecycle1() { setup_tracing(); - async fn test(cluster: Arc>) { - let cluster = cluster.lock().await; + async fn test(cluster: &mut Cluster) { let session = cluster.make_session_builder().await.build().await.unwrap(); let rows = session diff --git a/scylla/tests/integration/ccm/lib/mod.rs b/scylla/tests/integration/ccm/lib/mod.rs index 5b213fb07f..055b3a5a92 100644 --- a/scylla/tests/integration/ccm/lib/mod.rs +++ b/scylla/tests/integration/ccm/lib/mod.rs @@ -4,9 +4,7 @@ mod ip_allocator; mod logged_cmd; pub(crate) mod node; -use std::future::Future; use std::path::PathBuf; -use std::sync::Arc; use std::sync::LazyLock; use cluster::Cluster; @@ -57,11 +55,10 @@ static ROOT_CCM_DIR: LazyLock = LazyLock::new(|| { ccm_root_dir }); -pub(crate) async fn run_ccm_test(make_cluster_options: C, test_body: T) +pub(crate) async fn run_ccm_test(make_cluster_options: C, test_body: T) where C: FnOnce() -> ClusterOptions, - T: FnOnce(Arc>) -> Fut, - Fut: Future, + T: AsyncFnOnce(&mut Cluster) -> (), { run_ccm_test_with_configuration( make_cluster_options, @@ -93,16 +90,14 @@ where /// /// run_ccm_test_with_configuration(ClusterOptions::default, configure_cluster, test).await; /// ``` -pub(crate) async fn run_ccm_test_with_configuration( +pub(crate) async fn run_ccm_test_with_configuration( make_cluster_options: C, configure: Conf, test_body: T, ) where C: FnOnce() -> ClusterOptions, - Conf: FnOnce(Cluster) -> ConfFut, - ConfFut: Future, - T: FnOnce(Arc>) -> TFut, - TFut: Future, + Conf: AsyncFnOnce(Cluster) -> Cluster, + T: AsyncFnOnce(&mut Cluster) -> (), { let cluster_options = make_cluster_options(); let mut cluster = Cluster::new(cluster_options) @@ -112,16 +107,16 @@ pub(crate) async fn run_ccm_test_with_configuration( cluster = configure(cluster).await; cluster.start(None).await.expect("failed to start cluster"); - struct ClusterWrapper(Arc>); + struct ClusterWrapper(Cluster); impl Drop for ClusterWrapper { fn drop(&mut self) { if std::thread::panicking() && *TEST_KEEP_CLUSTER_ON_FAILURE { println!("Test failed, keep cluster alive, TEST_KEEP_CLUSTER_ON_FAILURE=true"); - self.0.blocking_lock().set_keep_on_drop(true); + self.0.set_keep_on_drop(true); } } } - let wrapper = ClusterWrapper(Arc::new(tokio::sync::Mutex::new(cluster))); - test_body(Arc::clone(&wrapper.0)).await; + let mut wrapper = ClusterWrapper(cluster); + test_body(&mut wrapper.0).await; std::mem::drop(wrapper); } From fd849189e81600c1dd86c8ca20714bba90eb2405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Tue, 12 Aug 2025 22:45:56 +0200 Subject: [PATCH 19/19] CCM: Use `.catch_unwind` instead of wrapper It is imo more straightforward, easier to understand. --- scylla/tests/integration/ccm/lib/mod.rs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/scylla/tests/integration/ccm/lib/mod.rs b/scylla/tests/integration/ccm/lib/mod.rs index 055b3a5a92..832398d4ab 100644 --- a/scylla/tests/integration/ccm/lib/mod.rs +++ b/scylla/tests/integration/ccm/lib/mod.rs @@ -4,11 +4,13 @@ mod ip_allocator; mod logged_cmd; pub(crate) mod node; +use std::panic::AssertUnwindSafe; use std::path::PathBuf; use std::sync::LazyLock; use cluster::Cluster; use cluster::ClusterOptions; +use futures::FutureExt; use ip_allocator::IpAllocator; use tracing::info; @@ -107,16 +109,17 @@ pub(crate) async fn run_ccm_test_with_configuration( cluster = configure(cluster).await; cluster.start(None).await.expect("failed to start cluster"); - struct ClusterWrapper(Cluster); - impl Drop for ClusterWrapper { - fn drop(&mut self) { - if std::thread::panicking() && *TEST_KEEP_CLUSTER_ON_FAILURE { + let result = AssertUnwindSafe(test_body(&mut cluster)) + .catch_unwind() + .await; + match result { + Ok(()) => (), + Err(err) => { + if *TEST_KEEP_CLUSTER_ON_FAILURE { println!("Test failed, keep cluster alive, TEST_KEEP_CLUSTER_ON_FAILURE=true"); - self.0.set_keep_on_drop(true); + cluster.set_keep_on_drop(true); } + std::panic::resume_unwind(err); } } - let mut wrapper = ClusterWrapper(cluster); - test_body(&mut wrapper.0).await; - std::mem::drop(wrapper); }