mz_ore::str

Function closure_to_display

Source
pub fn closure_to_display<F>(fun: F) -> impl Display
where F: Fn(&mut Formatter<'_>) -> Result,
Expand description

Given a closure, it creates a Display that simply calls the given closure when fmt’d.