Consider adding fmt::fmt_fn
or fmt::from_fn
to the standard library
#102386
Labels
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
Similar to
iter::from_fn
andfuture::poll_fn
, I find it useful to have afmt::fmt_fn
orfmt::from_fn
function that converts a function into a value that implementsDebug
andDisplay
:Or maybe we can have two different functions:
display_fn
anddebug_fn
, wheredisplay_fn
returns a value that implementsDisplay
, anddebug_fn
returns a value that implementsDebug
.The text was updated successfully, but these errors were encountered: