From 342e11e74d675c5a37d8961451a15827b1c9aa1d Mon Sep 17 00:00:00 2001 From: Lucas Kent Date: Wed, 31 Jul 2024 13:22:05 +1000 Subject: [PATCH] Remove unneeded deps (#1713) --- Cargo.lock | 14 +------------- Cargo.toml | 3 +-- shotover-proxy/Cargo.toml | 1 - .../tests/redis_int_tests/basic_driver_tests.rs | 2 +- shotover/Cargo.toml | 3 +-- shotover/src/frame/value.rs | 2 +- 6 files changed, 5 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 61e20c8b6..457cfad7b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3653,16 +3653,6 @@ dependencies = [ "serde", ] -[[package]] -name = "rand_distr" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" -dependencies = [ - "num-traits", - "rand", -] - [[package]] name = "rand_pcg" version = "0.3.1" @@ -4669,12 +4659,11 @@ dependencies = [ "metrics", "metrics-exporter-prometheus", "nonzero_ext", - "num", + "num-bigint", "ordered-float", "pretty-hex", "pretty_assertions", "rand", - "rand_distr", "redis-protocol", "rustls 0.23.12", "rustls-pemfile 2.1.2", @@ -4723,7 +4712,6 @@ dependencies = [ "pretty_assertions", "prometheus-parse", "rand", - "rand_distr", "redis", "redis-protocol", "regex", diff --git a/Cargo.toml b/Cargo.toml index 55a946d72..0c0f30242 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,8 +48,7 @@ bincode = "1.3.1" futures = "0.3" hex = "0.4.3" hex-literal = "0.4.1" -rand = "0.8.4" -rand_distr = "0.4.1" +rand = { version = "0.8.4", default-features = false } clap = { version = "4.0.4", features = ["cargo", "derive"] } async-trait = "0.1.30" typetag = "0.2.5" diff --git a/shotover-proxy/Cargo.toml b/shotover-proxy/Cargo.toml index 8239ac4af..52cf2404b 100644 --- a/shotover-proxy/Cargo.toml +++ b/shotover-proxy/Cargo.toml @@ -38,7 +38,6 @@ hex-literal.workspace = true cassandra-protocol.workspace = true bytes.workspace = true rand.workspace = true -rand_distr.workspace = true async-trait.workspace = true tracing-subscriber.workspace = true tracing-appender.workspace = true diff --git a/shotover-proxy/tests/redis_int_tests/basic_driver_tests.rs b/shotover-proxy/tests/redis_int_tests/basic_driver_tests.rs index 9568d8586..00d90a031 100644 --- a/shotover-proxy/tests/redis_int_tests/basic_driver_tests.rs +++ b/shotover-proxy/tests/redis_int_tests/basic_driver_tests.rs @@ -5,8 +5,8 @@ use fred::clients::RedisClient; use fred::interfaces::ClientLike; use futures::{Future, StreamExt}; use pretty_assertions::assert_eq; +use rand::distributions::Alphanumeric; use rand::{thread_rng, Rng}; -use rand_distr::Alphanumeric; use redis::aio::Connection; use redis::cluster::ClusterConnection; use redis::{AsyncCommands, Commands, ErrorKind, RedisError, Value}; diff --git a/shotover/Cargo.toml b/shotover/Cargo.toml index b8b18e985..49ece9be5 100644 --- a/shotover/Cargo.toml +++ b/shotover/Cargo.toml @@ -62,7 +62,6 @@ rand = { features = ["small_rng"], workspace = true } lz4_flex = { version = "0.11.0", optional = true } clap.workspace = true itertools.workspace = true -rand_distr.workspace = true bytes.workspace = true futures.workspace = true tokio = { version = "1.25.0", features = [ @@ -93,7 +92,7 @@ serde.workspace = true serde_json = { workspace = true, optional = true } serde_yaml.workspace = true bincode = { workspace = true, optional = true } -num = { version = "0.4.0", features = ["serde"] } +num-bigint = { version = "0.4.0", features = ["serde"] } uuid = { workspace = true } bigdecimal = { version = "0.4.0", features = ["serde"] } base64 = { version = "0.22.0", optional = true } diff --git a/shotover/src/frame/value.rs b/shotover/src/frame/value.rs index 3bb161f61..60fa10e98 100644 --- a/shotover/src/frame/value.rs +++ b/shotover/src/frame/value.rs @@ -6,7 +6,7 @@ mod redis; use bigdecimal::BigDecimal; use bytes::Bytes; -use num::BigInt; +use num_bigint::BigInt; use ordered_float::OrderedFloat; use serde::{Deserialize, Serialize}; use std::collections::{BTreeMap, BTreeSet};