@@ -148,7 +148,6 @@ impl ByteLruCache {
148148 let gen = self . generations . peek ( id) . copied ( ) . unwrap_or ( 0 ) ;
149149 self . generations . put ( * id, gen + 1 ) ;
150150 }
151-
152151}
153152
154153// ── CachedBackend ─────────────────────────────────────────────────────────────
@@ -407,7 +406,10 @@ mod tests {
407406
408407 write_seg ( & mut cached, 1 , b"original" ) . await ;
409408 let _ = cached. read ( SegmentId ( 1 ) ) . await . unwrap ( ) ;
410- assert ! ( cached. cached_bytes( ) > 0 , "first read should populate cache" ) ;
409+ assert ! (
410+ cached. cached_bytes( ) > 0 ,
411+ "first read should populate cache"
412+ ) ;
411413
412414 // Overwrite the segment — cache must be invalidated.
413415 write_seg ( & mut cached, 1 , b"updated!" ) . await ;
@@ -471,7 +473,10 @@ mod tests {
471473 // The generation is now 2 (invalidated twice: once manually, once by write_seg).
472474 // Any in-flight read that captured gen=0 or gen=1 would be rejected.
473475 let result = cached. read ( SegmentId ( 1 ) ) . await . unwrap ( ) ;
474- assert_eq ! ( result, b"v2" , "must serve fresh data, not stale pre-write data" ) ;
476+ assert_eq ! (
477+ result, b"v2" ,
478+ "must serve fresh data, not stale pre-write data"
479+ ) ;
475480
476481 // Second read must hit the cache and still return v2.
477482 let result2 = cached. read ( SegmentId ( 1 ) ) . await . unwrap ( ) ;
@@ -494,7 +499,9 @@ mod tests {
494499 } ;
495500 let mut txn = cached. begin_txn ( ) . await . unwrap ( ) ;
496501 txn. append ( SegmentId ( 1 ) , b"updated" ) . await . unwrap ( ) ;
497- txn. set_segment_metadata ( SegmentId ( 1 ) , seg_new) . await . unwrap ( ) ;
502+ txn. set_segment_metadata ( SegmentId ( 1 ) , seg_new)
503+ . await
504+ . unwrap ( ) ;
498505 txn. commit ( ) . await . unwrap ( ) ;
499506
500507 // Cache should have been invalidated at commit time.
0 commit comments