1 2 3 4 5 6 7 8 9 10 11 12 13 14
use js_promises::*; use std::panic; fn main() { Promise::<String,String>::new_resolved("asdf".into()) .and_then::<String,_>(|_res| panic!("oops")) .then::<(),(),_>(|_res| { Ok(PromiseOk::Immediate(())) }) ; }