Skip to content

Commit

Permalink
Merge pull request scylladb#1141 from wprzytula/deprecate-legacy-items
Browse files Browse the repository at this point in the history
Deprecate legacy items
  • Loading branch information
wprzytula authored Dec 11, 2024
2 parents affcf82 + c136255 commit 868d86f
Show file tree
Hide file tree
Showing 20 changed files with 1,085 additions and 892 deletions.
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}")]
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 @@ -2410,6 +2410,7 @@ mod tests {
);
}

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

0 comments on commit 868d86f

Please sign in to comment.