Skip to content

Commit

Permalink
f_errors: remove ParseError
Browse files Browse the repository at this point in the history
  • Loading branch information
muzarski committed Sep 16, 2024
1 parent d86d341 commit bad39b2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
21 changes: 1 addition & 20 deletions scylla-cql/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -654,24 +653,6 @@ impl From<SerializationError> for QueryError {
}
}

impl From<DeserializationError> for QueryError {
fn from(value: DeserializationError) -> Self {
Self::InvalidMessage(value.to_string())
}
}

impl From<TypeCheckError> for QueryError {
fn from(value: TypeCheckError) -> Self {
Self::InvalidMessage(value.to_string())
}
}

impl From<ParseError> for QueryError {
fn from(parse_error: ParseError) -> QueryError {
QueryError::InvalidMessage(format!("Error parsing message: {}", parse_error))
}
}

impl From<tokio::time::error::Elapsed> for QueryError {
fn from(timer_error: tokio::time::error::Elapsed) -> QueryError {
QueryError::RequestTimeout(format!("{}", timer_error))
Expand Down
3 changes: 0 additions & 3 deletions scylla-cql/src/frame/frame_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit bad39b2

Please sign in to comment.