Skip to content

Commit d632a0f

Browse files
committed
Attempting to fix Miri
1 parent 12bee98 commit d632a0f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

futures/tests/stream.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -299,13 +299,14 @@ fn flatten_unordered() {
299299

300300
// stream panics
301301
{
302-
let st = once(async { once(async { panic!("Polled") }).boxed() }.boxed()).chain(
303-
Interchanger { polled: false, base: 0, wake_immediately: true }
304-
.then(|val| async move { val.boxed() }.boxed())
305-
.take(10),
306-
);
302+
let st = once(async { once(Box::pin(async { panic!("Polled") })).left_stream() }.boxed())
303+
.chain(
304+
Interchanger { polled: false, base: 0, wake_immediately: true }
305+
.then(|val| async move { val.right_stream() }.boxed())
306+
.take(10),
307+
);
307308

308-
let stream = Arc::new(Mutex::new(st.boxed().flat_map_unordered(10, |s| s.map(identity))));
309+
let stream = Arc::new(Mutex::new(st.flat_map_unordered(10, |s| s.map(identity))));
309310

310311
std::thread::spawn({
311312
let stream = stream.clone();

0 commit comments

Comments
 (0)