Skip to content

Commit 923201e

Browse files
committed
fix: use pub(crate) visibility for RecordingTimestampGenerator
The struct and its methods only need crate-level visibility since the module itself is pub(crate). Using pub triggers the unnameable_types lint.
1 parent 5cb0fbf commit 923201e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

scylla-rust-wrapper/src/timestamp_generator.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ pub enum CassTimestampGen {
1717
/// A wrapper around `MonotonicTimestampGenerator` that records all generated timestamps.
1818
/// This is used for integration testing purposes only.
1919
#[cfg(cpp_integration_testing)]
20-
pub struct RecordingTimestampGenerator {
20+
pub(crate) struct RecordingTimestampGenerator {
2121
inner: MonotonicTimestampGenerator,
2222
timestamps: std::sync::Mutex<Vec<i64>>,
2323
}
2424

2525
#[cfg(cpp_integration_testing)]
2626
impl RecordingTimestampGenerator {
27-
pub fn new() -> Self {
27+
pub(crate) fn new() -> Self {
2828
Self {
2929
inner: MonotonicTimestampGenerator::new(),
3030
timestamps: std::sync::Mutex::new(Vec::new()),
3131
}
3232
}
3333

34-
pub fn contains(&self, timestamp: i64) -> bool {
34+
pub(crate) fn contains(&self, timestamp: i64) -> bool {
3535
self.timestamps.lock().unwrap().contains(&timestamp)
3636
}
3737
}

0 commit comments

Comments
 (0)