pub fn closure_to_display<F>(fun: F) -> impl Displaywhere F: Fn(&mut Formatter<'_>) -> Result,
Given a closure, it creates a Display that simply calls the given closure when fmt’d.