change expect to unwrap

pull/180/head
Fedor Sakharov 5 years ago
parent 6c3f8af62d
commit 0080a0da8c
No known key found for this signature in database
GPG Key ID: 93D436E666BF0FEE

@ -42,21 +42,12 @@ where
match next {
Some(v) => {
cx.waker().wake_by_ref();
let old = self
.as_mut()
.acc()
.take()
.expect("FoldFuture should never contain None");
let old = self.as_mut().acc().take().unwrap();
let new = (self.as_mut().f())(old, v);
*self.as_mut().acc() = Some(new);
Poll::Pending
}
None => Poll::Ready(
self.as_mut()
.acc()
.take()
.expect("FoldFuture should never contain None"),
),
None => Poll::Ready(self.as_mut().acc().take().unwrap()),
}
}
}

Loading…
Cancel
Save