Replies: 1 comment
-
I've played a bit with this idea. I think we can do that, but right now I don't clearly see the interface. Display::fmt returns std::fmt::Error only, so Num2Err should be returned before that. Something like
Currently, Rust doesn't support custom format specifiers. There is custom_format crate, but I don't think it's a perfectly good idea to add it as dependency. We can do something like the last comment here; but I don't like the idea to boilerplate 5 sametypes for each language (but maybe we can do it with a macro?). Any better ideas? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It's faster and more rust-way to
write!
everything into Formatter than creating aVec<String>
,.join
ing them and returning. Those who need a string still can useto_string
method instead ofto_words
.Beta Was this translation helpful? Give feedback.
All reactions