Skip to content

Commit

Permalink
errors: rename variant ProtocolErrorTyped -> ProtocolError
Browse files Browse the repository at this point in the history
  • Loading branch information
muzarski committed Oct 2, 2024
1 parent 635fde5 commit 92311fc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions scylla/src/transport/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pub enum QueryError {

/// Protocol error.
#[error("Protocol error: {0}")]
ProtocolErrorTyped(#[from] ProtocolError),
ProtocolError(#[from] ProtocolError),

/// Timeout error has occurred, function didn't complete in time.
#[error("Timeout Error")]
Expand Down Expand Up @@ -147,7 +147,7 @@ impl From<QueryError> for NewSessionError {
QueryError::BodyExtensionsParseError(e) => NewSessionError::BodyExtensionsParseError(e),
QueryError::MetadataError(e) => NewSessionError::MetadataError(e),
QueryError::ConnectionPoolError(e) => NewSessionError::ConnectionPoolError(e),
QueryError::ProtocolErrorTyped(e) => NewSessionError::ProtocolErrorTyped(e),
QueryError::ProtocolError(e) => NewSessionError::ProtocolError(e),
QueryError::TimeoutError => NewSessionError::TimeoutError,
QueryError::BrokenConnection(e) => NewSessionError::BrokenConnection(e),
QueryError::UnableToAllocStreamId => NewSessionError::UnableToAllocStreamId,
Expand Down Expand Up @@ -215,7 +215,7 @@ pub enum NewSessionError {

/// Protocol error.
#[error("Protocol error: {0}")]
ProtocolErrorTyped(#[from] ProtocolError),
ProtocolError(#[from] ProtocolError),

/// Timeout error has occurred, couldn't connect to node in time.
#[error("Timeout Error")]
Expand Down
2 changes: 1 addition & 1 deletion scylla/src/transport/load_balancing/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2857,7 +2857,7 @@ mod latency_awareness {
| QueryError::CqlErrorParseError(_)
| QueryError::BodyExtensionsParseError(_)
| QueryError::MetadataError(_)
| QueryError::ProtocolErrorTyped(_)
| QueryError::ProtocolError(_)
| QueryError::TimeoutError
| QueryError::RequestTimeout(_) => true,
}
Expand Down
2 changes: 1 addition & 1 deletion scylla/src/transport/speculative_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ fn can_be_ignored<ResT>(result: &Result<ResT, QueryError>) -> bool {
}
}

const EMPTY_PLAN_ERROR: QueryError = QueryError::ProtocolErrorTyped(ProtocolError::EmptyPlan);
const EMPTY_PLAN_ERROR: QueryError = QueryError::ProtocolError(ProtocolError::EmptyPlan);

pub(crate) async fn execute<QueryFut, ResT>(
policy: &dyn SpeculativeExecutionPolicy,
Expand Down

0 comments on commit 92311fc

Please sign in to comment.