pub fn should_fail<A, F>(f: F) -> Box<Fn(&mut Engine) -> Result<()>>
where
    F: 'static + Fn(&mut Engine) -> Result<A>,
{
    Box::new(move |holmes: &mut Engine| {
        match f(holmes) {
            Ok(_) => panic!("should_fail"), //TODO put something more reasonable here?
            Err(_) => Ok(()),
        }
    })
}
/// Panics on success, and suppresses an error
Panics on success, and suppresses an error
Panics on success and suppresses an error
pub fn should_fail<A, F>(f: F) -> Box<Fn(&mut Engine) -> Result<()>>
where
    F: 'static + Fn(&mut Engine) -> Result<A>,
{
    Box::new(move |holmes: &mut Engine| {
        match f(holmes) {
            Ok(_) => panic!("should_fail"), //TODO put something more reasonable here?
            Err(_) => Ok(()),
        }
    })
}
pub fn should_fail < A , F > ( f : F ) -> Box < Fn ( & mut Engine ) -> Result < ( ) > > where F : ' static + Fn ( & mut Engine ) -> Result < A > , { Box :: new ( move | holmes : & mut Engine | { match f ( holmes ) { Ok ( _ ) => panic ! ( " " ) , //TODO put something more reasonable here? Err ( _ ) => Ok ( ( ) ) , } } ) }
Panics on success, and suppresses an error
Panics on success and suppresses an error
f
F
f
F