Skip to content

Commit

Permalink
scylla-cql: add assert_matches as dev-dep
Browse files Browse the repository at this point in the history
This will be helpful in testing deserialization framework, and will also
be used in serialization instead of assert!(matches!(...)).
As a bonus, Cargo.toml of all crates was auto formatted.
  • Loading branch information
wprzytula committed May 21, 2024
1 parent d0b5888 commit 165e8a8
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 9 deletions.
1 change: 1 addition & 0 deletions Cargo.lock.msrv

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions scylla-cql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ serde = { version = "1.0", features = ["derive"], optional = true }
time = { version = "0.3", optional = true }

[dev-dependencies]
criterion = "0.4" # Note: v0.5 needs at least rust 1.70.0
assert_matches = "1.5.0"
criterion = "0.4" # Note: v0.5 needs at least rust 1.70.0
# Use large-dates feature to test potential edge cases
time = { version = "0.3.21", features = ["large-dates"] }

Expand All @@ -43,7 +44,14 @@ chrono = ["dep:chrono"]
num-bigint-03 = ["dep:num-bigint-03"]
num-bigint-04 = ["dep:num-bigint-04"]
bigdecimal-04 = ["dep:bigdecimal-04"]
full-serialization = ["chrono", "time", "secret", "num-bigint-03", "num-bigint-04", "bigdecimal-04"]
full-serialization = [
"chrono",
"time",
"secret",
"num-bigint-03",
"num-bigint-04",
"bigdecimal-04",
]

[lints.rust]
unreachable_pub = "warn"
4 changes: 2 additions & 2 deletions scylla-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ proc-macro = true
[dependencies]
darling = "0.20.0"
syn = "2.0"
quote = "1.0"
quote = "1.0"
proc-macro2 = "1.0"

[lints.rust]
unreachable_pub = "warn"
unreachable_pub = "warn"
10 changes: 9 additions & 1 deletion scylla-proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@ scylla-cql = { version = "0.2.0", path = "../scylla-cql" }
byteorder = "1.3.4"
bytes = "1.2.0"
futures = "0.3.6"
tokio = { version = "1.12", features = ["net", "time", "io-util", "sync", "rt", "macros", "rt-multi-thread"] }
tokio = { version = "1.12", features = [
"net",
"time",
"io-util",
"sync",
"rt",
"macros",
"rt-multi-thread",
] }
uuid = "1.0"
thiserror = "1.0.32"
bigdecimal = "0.4"
Expand Down
29 changes: 25 additions & 4 deletions scylla/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,28 @@ rustdoc-args = ["--cfg", "docsrs"]
[features]
default = []
ssl = ["dep:tokio-openssl", "dep:openssl"]
cloud = ["ssl", "scylla-cql/serde", "dep:serde_yaml", "dep:serde", "dep:url", "dep:base64"]
cloud = [
"ssl",
"scylla-cql/serde",
"dep:serde_yaml",
"dep:serde",
"dep:url",
"dep:base64",
]
secret = ["scylla-cql/secret"]
chrono = ["scylla-cql/chrono"]
time = ["scylla-cql/time"]
num-bigint-03 = ["scylla-cql/num-bigint-03"]
num-bigint-04 = ["scylla-cql/num-bigint-04"]
bigdecimal-04 = ["scylla-cql/bigdecimal-04"]
full-serialization = ["chrono", "time", "secret", "num-bigint-03", "num-bigint-04", "bigdecimal-04"]
full-serialization = [
"chrono",
"time",
"secret",
"num-bigint-03",
"num-bigint-04",
"bigdecimal-04",
]

[dependencies]
scylla-macros = { version = "0.5.0", path = "../scylla-macros" }
Expand All @@ -33,7 +47,14 @@ bytes = "1.0.1"
futures = "0.3.6"
hashbrown = "0.14"
histogram = "0.6.9"
tokio = { version = "1.34", features = ["net", "time", "io-util", "sync", "rt", "macros"] }
tokio = { version = "1.34", features = [
"net",
"time",
"io-util",
"sync",
"rt",
"macros",
] }
snap = "1.0"
uuid = { version = "1.0", features = ["v4"] }
rand = "0.8.3"
Expand Down Expand Up @@ -62,7 +83,7 @@ num-bigint-04 = { package = "num-bigint", version = "0.4" }
bigdecimal-04 = { package = "bigdecimal", version = "0.4" }
scylla-proxy = { version = "0.0.3", path = "../scylla-proxy" }
ntest = "0.9.0"
criterion = "0.4" # Note: v0.5 needs at least rust 1.70.0
criterion = "0.4" # Note: v0.5 needs at least rust 1.70.0
tokio = { version = "1.27", features = ["test-util"] }
tracing-subscriber = { version = "0.3.14", features = ["env-filter"] }
assert_matches = "1.5.0"
Expand Down

0 comments on commit 165e8a8

Please sign in to comment.