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 4, 2024
1 parent e1b3f84 commit 204f911
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions scylla/src/transport/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,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 @@ -157,7 +157,7 @@ impl From<QueryError> for NewSessionError {
QueryError::EmptyPlan => NewSessionError::EmptyPlan,
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 @@ -234,7 +234,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 @@ -2858,7 +2858,7 @@ mod latency_awareness {
| QueryError::CqlErrorParseError(_)
| QueryError::BodyExtensionsParseError(_)
| QueryError::MetadataError(_)
| QueryError::ProtocolErrorTyped(_)
| QueryError::ProtocolError(_)
| QueryError::TimeoutError
| QueryError::RequestTimeout(_) => true,
}
Expand Down

0 comments on commit 204f911

Please sign in to comment.