Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate legacy items #1141

Merged
merged 4 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 47 additions & 27 deletions Cargo.lock.msrv

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

2 changes: 1 addition & 1 deletion scylla-cql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tokio = { version = "1.34", features = ["io-util", "time"] }
secrecy-08 = { package = "secrecy", version = "0.8", optional = true }
snap = "1.0"
uuid = "1.0"
thiserror = "1.0"
thiserror = "2.0.6"
num-bigint-03 = { package = "num-bigint", version = "0.3", optional = true }
num-bigint-04 = { package = "num-bigint", version = "0.4", optional = true }
bigdecimal-04 = { package = "bigdecimal", version = "0.4", optional = true }
Expand Down
13 changes: 13 additions & 0 deletions scylla-cql/src/frame/response/cql_to_rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ use std::net::IpAddr;
use thiserror::Error;
use uuid::Uuid;

#[deprecated(
since = "0.15.1",
note = "Legacy deserialization API is inefficient and is going to be removed soon"
)]
#[allow(deprecated)]
#[derive(Error, Debug, Clone, PartialEq, Eq)]
pub enum FromRowError {
#[error("{err} in the column with index {column}")]
wprzytula marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -29,6 +34,10 @@ pub trait FromCqlVal<T>: Sized {
fn from_cql(cql_val: T) -> Result<Self, FromCqlValError>;
}

#[deprecated(
since = "0.15.1",
note = "Legacy deserialization API is inefficient and is going to be removed soon"
)]
#[derive(Error, Debug, Clone, PartialEq, Eq)]
pub enum FromCqlValError {
#[error("Bad CQL type")]
Expand Down Expand Up @@ -99,6 +108,10 @@ impl<T: FromCqlVal<CqlValue>> FromCqlVal<Option<CqlValue>> for Option<T> {
///
/// impl_from_cql_value_from_method!(MyBytes, into_my_bytes);
/// ```
#[deprecated(
since = "0.15.1",
note = "Legacy deserialization API is inefficient and is going to be removed soon"
)]
#[macro_export]
macro_rules! impl_from_cql_value_from_method {
($T:ty, $convert_func:ident) => {
Expand Down
1 change: 1 addition & 0 deletions scylla-cql/src/frame/response/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2475,6 +2475,7 @@ mod tests {
);
}

#[allow(deprecated)]
#[test]
fn test_serialize_empty() {
use crate::frame::value::Value;
Expand Down
Loading
Loading