diff --git a/scylla-cql/src/errors.rs b/scylla-cql/src/errors.rs index 7d6de0e1b..954252859 100644 --- a/scylla-cql/src/errors.rs +++ b/scylla-cql/src/errors.rs @@ -2,11 +2,10 @@ use crate::frame::frame_errors::{ CqlErrorParseError, CqlEventParseError, CqlResponseParseError, CqlResultParseError, - FrameDeserializationError, FrameSerializationError, ParseError, + FrameDeserializationError, FrameSerializationError, }; use crate::frame::protocol_features::ProtocolFeatures; use crate::frame::value::SerializeValuesError; -use crate::types::deserialize::{DeserializationError, TypeCheckError}; use crate::types::serialize::SerializationError; use crate::Consistency; use bytes::Bytes; @@ -654,24 +653,6 @@ impl From for QueryError { } } -impl From for QueryError { - fn from(value: DeserializationError) -> Self { - Self::InvalidMessage(value.to_string()) - } -} - -impl From for QueryError { - fn from(value: TypeCheckError) -> Self { - Self::InvalidMessage(value.to_string()) - } -} - -impl From for QueryError { - fn from(parse_error: ParseError) -> QueryError { - QueryError::InvalidMessage(format!("Error parsing message: {}", parse_error)) - } -} - impl From for QueryError { fn from(timer_error: tokio::time::error::Elapsed) -> QueryError { QueryError::RequestTimeout(format!("{}", timer_error)) diff --git a/scylla-cql/src/frame/frame_errors.rs b/scylla-cql/src/frame/frame_errors.rs index 114e1c504..62b8f42bf 100644 --- a/scylla-cql/src/frame/frame_errors.rs +++ b/scylla-cql/src/frame/frame_errors.rs @@ -60,9 +60,6 @@ pub enum FrameSerializationError { SnapCompressError(snap::Error), } -#[derive(Error, Debug)] -pub enum ParseError {} - #[non_exhaustive] #[derive(Error, Debug, Clone)] pub enum CqlRequestSerializationError {