1 2 3 4 5 6 7 8 9 10 11 12 13
//! Shared Test Utils use std::fmt::Debug; pub fn assert_is_err<T, E>(res: Result<T, E>) where T: Debug, E: Debug, { if res.is_ok() { assert!(false, "Expected {:?} to be an Error", res); } }