1 pub fn will_be_called() -> &'static str {
7 pub fn will_not_be_called() -> bool {
8 println!("should not have been called");
12 pub fn print<T>(left: &str, value: T, right: &str)
16 println!("{}{}{}", left, value, right);
19 pub fn wrap_with<F, T>(inner: T, should_wrap: bool, wrapper: F)
33 wrap_with(will_be_called(), less < more, |inner| print(" ***", inner, "*** "));
34 wrap_with(will_be_called(), more < less, |inner| print(" ***", inner, "*** "));
36 wrap_with(will_not_be_called(), true, |inner| print("wrapped result is: ", inner, ""));