File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 55/// Gets the unix timestamp as a duration
66pub 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};
2728static 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}
You can’t perform that action at this time.
0 commit comments