Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Nov 10, 2016
1 parent e40edf8 commit 00659e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/stream/unfold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ use stream::Stream;
/// # Example
///
/// ```rust
/// use futures::*;
/// use futures::stream::{self, Stream};
/// use futures::future::{self, Future};
///
/// let mut stream = stream::unfold(0, |state| {
/// if state <= 2 {
/// let next_state = state + 1;
/// let yielded = state * 2;
/// let fut = futures::finished::<_, u32>((yielded, next_state));
/// let fut = future::finished::<_, u32>((yielded, next_state));
/// Some(fut)
/// } else {
/// None
Expand Down
2 changes: 1 addition & 1 deletion tests/support/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub fn sassert_next<S: Stream>(s: &mut S, item: S::Item)
pub fn sassert_err<S: Stream>(s: &mut S, err: S::Error)
where S::Error: Eq + fmt::Debug
{
match task::spawn(s).poll_stream(unpark_panic()) {
match executor::spawn(s).poll_stream(unpark_panic()) {
Ok(Async::Ready(None)) => panic!("stream is at its end"),
Ok(Async::Ready(Some(_))) => panic!("stream had more elements"),
Ok(Async::NotReady) => panic!("stream wasn't ready"),
Expand Down

0 comments on commit 00659e1

Please sign in to comment.