From dfdae9562ae1c9317990bfd28a480bb85117d705 Mon Sep 17 00:00:00 2001 From: Lucas Kent Date: Mon, 5 Feb 2024 12:20:04 +1100 Subject: [PATCH] Update deps --- Cargo.lock | 189 ++++++++++------------- Cargo.toml | 2 +- ec2-cargo/Cargo.toml | 2 +- shotover/Cargo.toml | 2 +- test-helpers/Cargo.toml | 4 - test-helpers/src/connection/cassandra.rs | 26 ++-- windsock/Cargo.toml | 2 +- 7 files changed, 95 insertions(+), 132 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b358ecbc4..3a51cc1d2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -622,17 +622,6 @@ dependencies = [ "sha2", ] -[[package]] -name = "bigdecimal" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1e50562e37200edf7c6c43e54a08e64a5553bfb59d9c297d5572512aa517256" -dependencies = [ - "num-bigint 0.3.3", - "num-integer", - "num-traits", -] - [[package]] name = "bigdecimal" version = "0.4.2" @@ -641,7 +630,7 @@ checksum = "c06619be423ea5bb86c95f087d5707942791a08a85530df0db2209a3ecfb8bc9" dependencies = [ "autocfg", "libm", - "num-bigint 0.4.4", + "num-bigint", "num-integer", "num-traits", "serde", @@ -702,17 +691,6 @@ dependencies = [ "cipher", ] -[[package]] -name = "bstr" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" -dependencies = [ - "memchr", - "regex-automata 0.4.5", - "serde", -] - [[package]] name = "bumpalo" version = "3.14.0" @@ -1173,7 +1151,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1f6cd7c7c34a68a622a9b29048473f81f3333ab48ae9ebf857fcc008747402d" dependencies = [ - "bigdecimal 0.4.2", + "bigdecimal", "bytes", "hex", "itertools 0.11.0", @@ -1419,12 +1397,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.3" +version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +checksum = "fc5d6b04b3fd0ba9926f945895de7d806260a2d7431ba82e7edaecb043c4c6b8" dependencies = [ - "darling_core 0.20.3", - "darling_macro 0.20.3", + "darling_core 0.20.5", + "darling_macro 0.20.5", ] [[package]] @@ -1443,9 +1421,9 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.3" +version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +checksum = "04e48a959bcd5c761246f5d090ebc2fbf7b9cd527a492b07a67510c108f1e7e3" dependencies = [ "fnv", "ident_case", @@ -1468,11 +1446,11 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.3" +version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +checksum = "1d1545d67a2149e1d93b7e5c7752dce5a7426eb5d1357ddcfd89336b94444f77" dependencies = [ - "darling_core 0.20.3", + "darling_core 0.20.5", "quote", "syn 2.0.48", ] @@ -1873,7 +1851,7 @@ dependencies = [ "redis-protocol", "rustls 0.22.2", "rustls-native-certs 0.7.0", - "rustls-webpki 0.102.1", + "rustls-webpki 0.102.2", "semver", "socket2 0.5.5", "tokio", @@ -2084,7 +2062,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.11", - "indexmap 2.2.1", + "indexmap 2.2.2", "slab", "tokio", "tokio-util", @@ -2292,9 +2270,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.59" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -2342,9 +2320,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433de089bd45971eecf4668ee0ee8f4cec17db4f8bd8f7bc3197a6ce37aa7d9b" +checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" dependencies = [ "equivalent", "hashbrown 0.14.3", @@ -2461,7 +2439,7 @@ dependencies = [ "crc32c", "derive_builder", "flate2", - "indexmap 2.2.1", + "indexmap 2.2.2", "log", "lz4", "paste", @@ -2482,9 +2460,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.152" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libm" @@ -2665,9 +2643,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", ] @@ -2768,7 +2746,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" dependencies = [ - "num-bigint 0.4.4", + "num-bigint", "num-complex", "num-integer", "num-iter", @@ -2776,17 +2754,6 @@ dependencies = [ "num-traits", ] -[[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.4" @@ -2827,6 +2794,12 @@ dependencies = [ "serde", ] +[[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.45" @@ -2855,7 +2828,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ "autocfg", - "num-bigint 0.4.4", + "num-bigint", "num-integer", "num-traits", "serde", @@ -3004,9 +2977,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.2.1+3.2.0" +version = "300.2.2+3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fe476c29791a5ca0d1273c697e96085bbabbbea2ef7afd5617e78a4b40332d3" +checksum = "8bbfad0063610ac26ee79f7484739e2b07555a75c42453b89263830b5c8103bc" dependencies = [ "cc", ] @@ -3651,9 +3624,9 @@ checksum = "e898588f33fdd5b9420719948f9f2a32c922a246964576f71ba7f24f80610fbc" [[package]] name = "reqwest" -version = "0.11.23" +version = "0.11.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" +checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" dependencies = [ "async-compression", "base64", @@ -3674,9 +3647,11 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", + "sync_wrapper", "system-configuration", "tokio", "tokio-native-tls", @@ -3796,7 +3771,7 @@ dependencies = [ "hex-literal", "hmac", "log", - "num-bigint 0.4.4", + "num-bigint", "once_cell", "poly1305", "rand 0.8.5", @@ -3842,7 +3817,7 @@ dependencies = [ "inout", "log", "md5", - "num-bigint 0.4.4", + "num-bigint", "num-integer", "p256", "pbkdf2 0.11.0", @@ -3875,9 +3850,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.30" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ "bitflags 2.4.2", "errno", @@ -3907,7 +3882,7 @@ dependencies = [ "log", "ring", "rustls-pki-types", - "rustls-webpki 0.102.1", + "rustls-webpki 0.102.2", "subtle", "zeroize", ] @@ -3958,9 +3933,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e9d979b3ce68192e42760c7810125eb6cf2ea10efae545a156063e61f314e2a" +checksum = "0a716eb65e3158e90e17cd93d855216e27bde02745ab842f2cab4a39dba1bacf" [[package]] name = "rustls-webpki" @@ -3974,9 +3949,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.1" +version = "0.102.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef4ca26037c909dedb327b48c3327d0ba91d3dd3c4e05dad328f210ffb68e95b" +checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" dependencies = [ "ring", "rustls-pki-types", @@ -4053,13 +4028,12 @@ dependencies = [ [[package]] name = "scylla" -version = "0.11.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4bca1987121cceb419f0644cf064416f719c73c44b6cbe849b62fd3b7adc3c" +checksum = "03d2db76aa23f55d2ece5354e1a3778633098a3d1ea76153f494d71e92cd02d8" dependencies = [ "arc-swap", "async-trait", - "bigdecimal 0.2.2", "byteorder", "bytes", "chrono", @@ -4068,7 +4042,6 @@ dependencies = [ "histogram", "itertools 0.11.0", "lz4_flex", - "num-bigint 0.3.3", "num_enum 0.6.1", "openssl", "rand 0.8.5", @@ -4089,16 +4062,14 @@ dependencies = [ [[package]] name = "scylla-cql" -version = "0.0.11" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50938b1bbb5c6364617977939c09644384495f658dc899ec37fd90bce73e6f37" +checksum = "345626c0dd5d9624c413daaba854685bba6a65cff4eb5ea0fb0366df16901f67" dependencies = [ "async-trait", - "bigdecimal 0.2.2", "byteorder", "bytes", "lz4_flex", - "num-bigint 0.3.3", "num_enum 0.6.1", "scylla-macros", "snap", @@ -4109,11 +4080,11 @@ dependencies = [ [[package]] name = "scylla-macros" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22b6659cdeed34c5b83719edd4d9f023c18357677e3fbe14237a59f00403acce" +checksum = "eb6085ff9c3fd7e5163826901d39164ab86f11bdca16b2f766a00c528ff9cef9" dependencies = [ - "darling 0.20.3", + "darling 0.20.5", "proc-macro2", "quote", "syn 2.0.48", @@ -4210,15 +4181,15 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.5.1" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5c9fdb6b00a489875b22efd4b78fe2b363b72265cc5f6eb2e2b9ee270e6140c" +checksum = "1b0ed1662c5a68664f45b76d18deb0e234aff37207086803165c961eb695e981" dependencies = [ "base64", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.2.1", + "indexmap 2.2.2", "serde", "serde_json", "serde_with_macros", @@ -4227,11 +4198,11 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.5.1" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbff351eb4b33600a2e138dfa0b10b65a238ea8ff8fb2387c422c5022a3e8298" +checksum = "568577ff0ef47b879f736cd66740e022f3672788cdf002a05a4e609ea5a6fb15" dependencies = [ - "darling 0.20.3", + "darling 0.20.5", "proc-macro2", "quote", "syn 2.0.48", @@ -4243,7 +4214,7 @@ version = "0.9.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adf8a49373e98a4c5f0ceb5d05aa7c648d75f63774981ed95b7c7443bbd50c6e" dependencies = [ - "indexmap 2.2.1", + "indexmap 2.2.2", "itoa", "ryu", "serde", @@ -4292,9 +4263,6 @@ name = "shell-quote" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a09e78d1f98bc5db3fa689ae39f90c0b9af72fe83b0bb4a13b9636edad92fcbd" -dependencies = [ - "bstr", -] [[package]] name = "shellfish" @@ -4323,7 +4291,7 @@ dependencies = [ "backtrace", "backtrace-ext", "base64", - "bigdecimal 0.4.2", + "bigdecimal", "bincode", "bytes", "bytes-utils", @@ -4343,7 +4311,7 @@ dependencies = [ "halfbrown", "hex", "hex-literal", - "http 0.2.11", + "http 1.0.0", "httparse", "hyper", "itertools 0.12.1", @@ -4453,9 +4421,9 @@ dependencies = [ [[package]] name = "sketches-ddsketch" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a406c1882ed7f29cd5e248c9848a80e7cb6ae0fea82346d2746f2f941c07e1" +checksum = "85636c14b73d81f541e525f585c0a2109e6744e1565b5c1668e31c70c10ed65c" [[package]] name = "slab" @@ -4662,6 +4630,12 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "system-configuration" version = "0.5.1" @@ -4701,14 +4675,12 @@ name = "test-helpers" version = "0.1.0" dependencies = [ "anyhow", - "bigdecimal 0.2.2", "bytes", "cassandra-cpp", "cassandra-protocol", "cdrs-tokio", "docker-compose-runner", "itertools 0.12.1", - "num-bigint 0.3.3", "openssl", "ordered-float", "rcgen", @@ -4716,7 +4688,6 @@ dependencies = [ "redis", "reqwest", "scylla", - "serde_yaml", "subprocess", "tokio", "tokio-bin-process", @@ -4759,12 +4730,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ "deranged", "itoa", + "num-conv", "powerfmt", "serde", "time-core", @@ -4779,10 +4751,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" dependencies = [ + "num-conv", "time-core", ] @@ -4813,9 +4786,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.35.1" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" +checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" dependencies = [ "backtrace", "bytes", @@ -4978,7 +4951,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.1", + "indexmap 2.2.2", "toml_datetime", "winnow", ] @@ -5618,9 +5591,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.5.35" +version = "0.5.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1931d78a9c73861da0134f453bb1f790ce49b2e30eba8410b4b79bac72b46a2d" +checksum = "a7cad8365489051ae9f054164e459304af2e7e9bb407c958076c8bf4aef52da5" dependencies = [ "memchr", ] @@ -5660,7 +5633,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ "bit-vec", - "num-bigint 0.4.4", + "num-bigint", "time", ] diff --git a/Cargo.toml b/Cargo.toml index ff0df31c0..a990d586f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ debug = true codegen-units = 1 [workspace.dependencies] -scylla = { version = "0.11.0", features = ["ssl"] } +scylla = { version = "0.12.0", features = ["ssl"] } bytes = { version = "1.0.0", features = ["serde"] } tokio = { version = "1.25.0", features = ["full", "macros"] } tokio-util = { version = "0.7.7", features = ["codec"] } diff --git a/ec2-cargo/Cargo.toml b/ec2-cargo/Cargo.toml index 3bd5b6cf5..6a8af53e3 100644 --- a/ec2-cargo/Cargo.toml +++ b/ec2-cargo/Cargo.toml @@ -15,4 +15,4 @@ aws-throwaway.workspace = true tracing-appender.workspace = true shellfish = { version = "0.9.0", features = ["async"] } cargo_metadata = "0.18.0" -shell-quote = "0.5.0" +shell-quote.workspace = true diff --git a/shotover/Cargo.toml b/shotover/Cargo.toml index 50dfa523f..465b6cecc 100644 --- a/shotover/Cargo.toml +++ b/shotover/Cargo.toml @@ -88,7 +88,7 @@ uuid = { workspace = true } bigdecimal = { version = "0.4.0", features = ["serde"] } base64 = { version = "0.21.0", optional = true } httparse = { version = "1.8.0", optional = true } -http = { version = "0.2.9", optional = true } +http = { version = "1.0.0", optional = true } #Observability metrics = "0.21.0" diff --git a/test-helpers/Cargo.toml b/test-helpers/Cargo.toml index 032178fa4..d659ffb0f 100644 --- a/test-helpers/Cargo.toml +++ b/test-helpers/Cargo.toml @@ -29,11 +29,7 @@ tokio-openssl.workspace = true itertools.workspace = true reqwest.workspace = true tracing-subscriber.workspace = true -serde_yaml.workspace = true anyhow.workspace = true rcgen.workspace = true rdkafka = { version = "0.36", features = ["cmake-build"], optional = true } docker-compose-runner = "0.3.0" -# TODO: make scylla reexport these so we dont have to import random old versions -bigdecimal = "0.2.2" -num-bigint = "0.3.0" diff --git a/test-helpers/src/connection/cassandra.rs b/test-helpers/src/connection/cassandra.rs index 7859b0a62..6ccbfdf28 100644 --- a/test-helpers/src/connection/cassandra.rs +++ b/test-helpers/src/connection/cassandra.rs @@ -1,4 +1,3 @@ -use bigdecimal::BigDecimal; use bytes::BufMut; #[cfg(feature = "cassandra-cpp-driver-tests")] use cassandra_cpp::{ @@ -28,13 +27,12 @@ use cdrs_tokio::{ query_values, transport::TransportTcp, }; -use num_bigint::BigInt; use openssl::ssl::{SslContext, SslMethod}; use ordered_float::OrderedFloat; use scylla::batch::Batch as ScyllaBatch; use scylla::frame::response::result::CqlValue; use scylla::frame::types::Consistency as ScyllaConsistency; -use scylla::frame::value::{CqlDate, CqlTime, CqlTimestamp}; +use scylla::frame::value::{CqlDate, CqlDecimal, CqlTime, CqlTimestamp}; use scylla::prepared_statement::PreparedStatement as PreparedStatementScylla; use scylla::serialize::value::SerializeCql; use scylla::statement::query::Query as ScyllaQuery; @@ -711,8 +709,10 @@ impl CassandraConnection { ResultValue::Boolean(v) => Box::new(v), ResultValue::Decimal(buf) => { let scale = i32::from_be_bytes(buf[0..4].try_into().unwrap()); - let int_value = BigInt::from_signed_bytes_be(&buf[4..]); - Box::new(BigDecimal::from((int_value, scale as i64))) + let bytes = &buf[4..]; + Box::new(CqlDecimal::from_signed_be_bytes_slice_and_exponent( + bytes, scale, + )) } ResultValue::Double(v) => Box::new(*v.as_ref()), ResultValue::Float(v) => Box::new(*v.as_ref()), @@ -1105,24 +1105,18 @@ impl ResultValue { CqlValue::Boolean(b) => Self::Boolean(b), CqlValue::Counter(_counter) => todo!(), CqlValue::Decimal(d) => { - let (value, scale) = d.as_bigint_and_exponent(); + let (value, scale) = d.as_signed_be_bytes_slice_and_exponent(); let mut buf = vec![]; - let serialized = value.to_signed_bytes_be(); - buf.put_i32(scale.try_into().unwrap()); - buf.extend_from_slice(&serialized); + buf.put_i32(scale); + buf.extend_from_slice(value); Self::Decimal(buf) } CqlValue::Float(float) => Self::Float(float.into()), CqlValue::Int(int) => Self::Int(int), CqlValue::Timestamp(timestamp) => Self::Timestamp(timestamp.0), CqlValue::Uuid(uuid) => Self::Uuid(uuid), - CqlValue::Varint(var_int) => { - let mut buf = vec![]; - let serialized = var_int.to_signed_bytes_be(); - buf.extend_from_slice(&serialized); - Self::VarInt(buf) - } - CqlValue::Timeuuid(timeuuid) => Self::TimeUuid(timeuuid), + CqlValue::Varint(var_int) => Self::VarInt(var_int.into_signed_bytes_be()), + CqlValue::Timeuuid(timeuuid) => Self::TimeUuid(timeuuid.into()), CqlValue::Inet(ip) => Self::Inet(ip), CqlValue::Date(date) => Self::Date(date.0), CqlValue::Time(time) => Self::Time(time.0), diff --git a/windsock/Cargo.toml b/windsock/Cargo.toml index 16e92d4c0..178da7444 100644 --- a/windsock/Cargo.toml +++ b/windsock/Cargo.toml @@ -19,5 +19,5 @@ time = { version = "0.3.25", features = ["serde"] } tokio.workspace = true [dev-dependencies] -scylla = { version = "0.11.0", features = ["ssl"] } +scylla = { version = "0.12.0", features = ["ssl"] } docker-compose-runner = "0.3.0"