//! Definition of the `Option` (optional step) combinator use {Future, Poll, Async}; impl Future for Option where F: Future { type Item = Option; type Error = E; fn poll(&mut self) -> Poll, E> { match *self { None => Ok(Async::Ready(None)), Some(ref mut x) => x.poll().map(|x| x.map(Some)), } } }