|
|
|
|
|
by yjh0502
2991 days ago
|
|
I used it frequently when mixing `Result` with `Future`. For example, fn do_something() -> Box<Future<Item=(), Error=Error>> {
let val = match do_result() {
Ok(x) => x,
Err(e) => return Box::new(err(e.into())),
};
// do something with `val`
unimplemented!();
}
|
|