Skip to content

Commit

Permalink
scylla: static assert ensuring caching session impls Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
athre0z committed Dec 28, 2024
1 parent 3b83c93 commit dc2e939
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scylla/src/transport/caching_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ mod tests {
use crate::transport::partitioner::PartitionerName;
use crate::transport::session::Session;
use crate::utils::test_utils::unique_keyspace_name;
#[allow(deprecated)]
use crate::LegacyCachingSession;
use crate::{
batch::{Batch, BatchStatement},
prepared_statement::PreparedStatement,
Expand Down Expand Up @@ -780,4 +782,12 @@ mod tests {
verify_partitioner().await;
verify_partitioner().await;
}

// NOTE: intentionally no `#[test]`: this is a compile-time test
fn _caching_session_impls_debug() {
fn assert_debug<T: std::fmt::Debug>() {}
assert_debug::<CachingSession>();
#[allow(deprecated)]
assert_debug::<LegacyCachingSession>();
}
}

0 comments on commit dc2e939

Please sign in to comment.