1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
use {Future, Stream, Poll};
use task;
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
pub enum Never {}
impl Never {
pub fn never_into<T>(self) -> T {
match self {}
}
}
impl Future for Never {
type Item = Never;
type Error = Never;
fn poll(&mut self, _: &mut task::Context) -> Poll<Never, Never> {
match *self {}
}
}
impl Stream for Never {
type Item = Never;
type Error = Never;
fn poll_next(&mut self, _: &mut task::Context) -> Poll<Option<Never>, Never> {
match *self {}
}
}