Skip to content

Commit

Permalink
Attempting to fix Miri
Browse files Browse the repository at this point in the history
  • Loading branch information
olegnn committed Jan 23, 2022
1 parent 12bee98 commit d632a0f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions futures/tests/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,13 +299,14 @@ fn flatten_unordered() {

// stream panics
{
let st = once(async { once(async { panic!("Polled") }).boxed() }.boxed()).chain(
Interchanger { polled: false, base: 0, wake_immediately: true }
.then(|val| async move { val.boxed() }.boxed())
.take(10),
);
let st = once(async { once(Box::pin(async { panic!("Polled") })).left_stream() }.boxed())
.chain(
Interchanger { polled: false, base: 0, wake_immediately: true }
.then(|val| async move { val.right_stream() }.boxed())
.take(10),
);

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

std::thread::spawn({
let stream = stream.clone();
Expand Down

0 comments on commit d632a0f

Please sign in to comment.