@@ -7,7 +7,7 @@ use futures::FutureExt;
77use futures:: TryFutureExt ;
88use futures:: future:: BoxFuture ;
99use futures:: future:: WeakShared ;
10- use vortex_buffer:: ByteBuffer ;
10+ use vortex_buffer:: BufferHandle ;
1111use vortex_error:: SharedVortexResult ;
1212use vortex_error:: VortexError ;
1313use vortex_error:: VortexExpect ;
@@ -25,7 +25,7 @@ pub struct SharedSegmentSource<S> {
2525 in_flight : DashMap < SegmentId , WeakShared < SharedSegmentFuture > > ,
2626}
2727
28- type SharedSegmentFuture = BoxFuture < ' static , SharedVortexResult < ByteBuffer > > ;
28+ type SharedSegmentFuture = BoxFuture < ' static , SharedVortexResult < BufferHandle > > ;
2929
3030impl < S : SegmentSource > SharedSegmentSource < S > {
3131 /// Create a new `SharedSegmentSource` wrapping the provided inner source.
@@ -111,8 +111,8 @@ mod tests {
111111
112112 // Both futures should resolve to the same data
113113 let ( result1, result2) = futures:: join!( future1, future2) ;
114- assert_eq ! ( result1. unwrap( ) , data) ;
115- assert_eq ! ( result2. unwrap( ) , data) ;
114+ assert_eq ! ( * result1. unwrap( ) . bytes ( ) , data) ;
115+ assert_eq ! ( * result2. unwrap( ) . bytes ( ) , data) ;
116116
117117 // The inner source should have been called only once
118118 assert_eq ! ( source. request_count. load( Ordering :: Relaxed ) , 1 ) ;
@@ -142,7 +142,7 @@ mod tests {
142142
143143 // A new request should still work correctly
144144 let result = shared_source. request ( id) . await ;
145- assert_eq ! ( result. unwrap( ) , data) ;
145+ assert_eq ! ( * result. unwrap( ) . bytes ( ) , data) ;
146146
147147 // Should have made 2 requests since the first was dropped before completion
148148 assert_eq ! ( source. request_count. load( Ordering :: Relaxed ) , 2 ) ;
0 commit comments