Skip to content

Commit

Permalink
f_errors: remove BadIncomingData from ParseError
Browse files Browse the repository at this point in the history
We remove last usage (an impl) of this variant.

This variant was the most awful, since it stringified many errors.
We fortunately can remove it now.
  • Loading branch information
muzarski committed Aug 27, 2024
1 parent 867c4e9 commit 183c6d8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 0 additions & 2 deletions scylla-cql/src/frame/frame_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ pub enum FrameSerializationError {
pub enum ParseError {
#[error("Low-level deserialization failed: {0}")]
LowLevelDeserializationError(#[from] LowLevelDeserializationError),
#[error("Could not deserialize frame: {0}")]
BadIncomingData(String),
#[error(transparent)]
TryFromIntError(#[from] std::num::TryFromIntError),
}
Expand Down
8 changes: 1 addition & 7 deletions scylla-cql/src/frame/request/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use thiserror::Error;

use crate::{
frame::{
frame_errors::{CqlRequestSerializationError, ParseError},
frame_errors::CqlRequestSerializationError,
request::{RequestOpcode, SerializableRequest},
types::{self, SerialConsistency},
},
Expand Down Expand Up @@ -52,12 +52,6 @@ pub struct BatchTypeParseError {
value: u8,
}

impl From<BatchTypeParseError> for ParseError {
fn from(err: BatchTypeParseError) -> Self {
Self::BadIncomingData(format!("Bad BatchType value: {}", err.value))
}
}

impl TryFrom<u8> for BatchType {
type Error = BatchTypeParseError;

Expand Down

0 comments on commit 183c6d8

Please sign in to comment.