@@ -328,6 +328,7 @@ cached_control! {
328
328
Key = { input. to_owned( ) } ;
329
329
PostGet ( cached_val) = return Ok ( cached_val. clone( ) ) ;
330
330
PostExec ( body_result) = {
331
+ #[ allow( clippy:: question_mark) ]
331
332
match body_result {
332
333
Ok ( v) => v,
333
334
Err ( e) => return Err ( e) ,
@@ -848,7 +849,7 @@ async fn test_only_cached_option_once_per_second_a() {
848
849
/// to return the cached result of the one call instead of all
849
850
/// concurrently un-cached tasks executing and writing concurrently.
850
851
#[ cfg( feature = "async" ) ]
851
- #[ once( time = 2 , sync_writes = "default" ) ]
852
+ #[ once( time = 2 , sync_writes) ]
852
853
async fn only_cached_once_per_second_sync_writes ( s : String ) -> Vec < String > {
853
854
vec ! [ s]
854
855
}
@@ -910,9 +911,9 @@ fn test_cached_sync_writes_by_key() {
910
911
let b = std:: thread:: spawn ( || cached_sync_writes_by_key ( "b" . to_string ( ) ) ) ;
911
912
let c = std:: thread:: spawn ( || cached_sync_writes_by_key ( "c" . to_string ( ) ) ) ;
912
913
let start = Instant :: now ( ) ;
913
- let a = a. join ( ) . unwrap ( ) ;
914
- let b = b. join ( ) . unwrap ( ) ;
915
- let c = c. join ( ) . unwrap ( ) ;
914
+ let _ = a. join ( ) . unwrap ( ) ;
915
+ let _ = b. join ( ) . unwrap ( ) ;
916
+ let _ = c. join ( ) . unwrap ( ) ;
916
917
assert ! ( start. elapsed( ) < Duration :: from_secs( 2 ) ) ;
917
918
}
918
919
@@ -942,7 +943,7 @@ async fn test_cached_sync_writes_by_key_a() {
942
943
}
943
944
944
945
#[ cfg( feature = "async" ) ]
945
- #[ once( sync_writes = "default" ) ]
946
+ #[ once( sync_writes = true ) ]
946
947
async fn once_sync_writes_a ( s : & tokio:: sync:: Mutex < String > ) -> String {
947
948
let mut guard = s. lock ( ) . await ;
948
949
let results: String = ( * guard) . clone ( ) . to_string ( ) ;
0 commit comments