Skip to content

Commit 14371c0

Browse files
authored
Merge pull request #1269 from Lorak-mmk/request-info-non-exhaustive
Mark some policies-related structs as non_exhaustive
2 parents c09213b + c551652 commit 14371c0

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

scylla/src/policies/load_balancing/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ pub use plan::Plan;
1818

1919
/// Represents info about statement that can be used by load balancing policies.
2020
#[derive(Default, Clone, Debug)]
21+
#[non_exhaustive]
2122
pub struct RoutingInfo<'a> {
2223
/// Requested consistency information allows to route requests to the appropriate
2324
/// datacenters. E.g. requests with a LOCAL_ONE consistency should be routed to the same

scylla/src/policies/retry/retry_policy.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use crate::errors::RequestAttemptError;
66
use crate::frame::types::Consistency;
77

88
/// Information about a failed request
9+
#[non_exhaustive]
910
pub struct RequestInfo<'a> {
1011
/// The error with which the request failed
1112
pub error: &'a RequestAttemptError,

scylla/src/policies/speculative_execution.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use crate::errors::{RequestAttemptError, RequestError};
1212
use crate::observability::metrics::Metrics;
1313

1414
/// Context is passed as an argument to `SpeculativeExecutionPolicy` methods
15+
#[non_exhaustive]
1516
pub struct Context {
1617
#[cfg(feature = "metrics")]
1718
pub metrics: Arc<Metrics>,

scylla/tests/integration/consistency.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ impl OwnedRoutingInfo {
353353
token,
354354
table,
355355
is_confirmed_lwt,
356+
..
356357
} = info;
357358
Self {
358359
consistency,

0 commit comments

Comments
 (0)