@@ -254,20 +254,15 @@ where
254
254
cycle. throw ( )
255
255
}
256
256
crate :: plumbing:: CycleRecoveryStrategy :: Fallback => {
257
- match active_query. take_cycle ( ) {
258
- Some ( c) => {
259
- assert ! ( c. is( & cycle) ) ;
260
- Q :: cycle_fallback ( db, & cycle, key)
261
- }
262
- _ => {
263
- // we are not a participant in this cycle
264
- debug_assert ! (
265
- !cycle
266
- . participant_keys( )
267
- . any( |k| k == self . database_key_index( ) )
268
- ) ;
269
- cycle. throw ( )
270
- }
257
+ if let Some ( c) = active_query. take_cycle ( ) {
258
+ assert ! ( c. is( & cycle) ) ;
259
+ Q :: cycle_fallback ( db, & cycle, key)
260
+ } else {
261
+ // we are not a participant in this cycle
262
+ debug_assert ! ( !cycle
263
+ . participant_keys( )
264
+ . any( |k| k == self . database_key_index( ) ) ) ;
265
+ cycle. throw ( )
271
266
}
272
267
}
273
268
}
@@ -376,25 +371,22 @@ where
376
371
return ProbeState :: Stale ( state) ;
377
372
}
378
373
379
- match & memo. value {
380
- Some ( value) => {
381
- let value = StampedValue {
382
- durability : memo. revisions . durability ,
383
- changed_at : memo. revisions . changed_at ,
384
- value : value. clone ( ) ,
385
- } ;
374
+ if let Some ( value) = & memo. value {
375
+ let value = StampedValue {
376
+ durability : memo. revisions . durability ,
377
+ changed_at : memo. revisions . changed_at ,
378
+ value : value. clone ( ) ,
379
+ } ;
386
380
387
381
trace ! (
388
382
"{:?}: returning memoized value changed at {:?}" ,
389
383
self , value. changed_at
390
384
) ;
391
385
392
- ProbeState :: UpToDate ( value)
393
- }
394
- _ => {
395
- let changed_at = memo. revisions . changed_at ;
396
- ProbeState :: NoValue ( state, changed_at)
397
- }
386
+ ProbeState :: UpToDate ( value)
387
+ } else {
388
+ let changed_at = memo. revisions . changed_at ;
389
+ ProbeState :: NoValue ( state, changed_at)
398
390
}
399
391
}
400
392
}
0 commit comments