Skip to content

Commit e01aa48

Browse files
committed
clippy
1 parent 20fbd9a commit e01aa48

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/seqno.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ impl SequenceNumberCounter {
5858

5959
/// Gets the next sequence number.
6060
#[must_use]
61+
#[allow(clippy::missing_panics_doc, reason = "we should never run out of u64s")]
6162
pub fn next(&self) -> SeqNo {
6263
let seqno = self.0.fetch_add(1, Release);
6364

src/time.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
/// Gets the unix timestamp as a duration
66
pub fn unix_timestamp() -> std::time::Duration {
77
#[cfg(test)]
8+
#[allow(clippy::significant_drop_in_scrutinee, clippy::expect_used)]
89
{
910
if let Some(cell) = NOW_OVERRIDE.get() {
1011
if let Some(override_val) = *cell.lock().expect("lock is poisoned") {
@@ -27,7 +28,8 @@ use std::sync::{Mutex, OnceLock};
2728
static NOW_OVERRIDE: OnceLock<Mutex<Option<std::time::Duration>>> = OnceLock::new();
2829

2930
#[cfg(test)]
30-
pub(crate) fn set_unix_timestamp_for_test(value: Option<std::time::Duration>) {
31+
#[allow(clippy::expect_used)]
32+
pub fn set_unix_timestamp_for_test(value: Option<std::time::Duration>) {
3133
let cell = NOW_OVERRIDE.get_or_init(|| Mutex::new(None));
3234
*cell.lock().expect("lock is poisoned") = value;
3335
}

0 commit comments

Comments
 (0)