3 ms·
What is the point of this function? In rust, there's no equivalent to sprintf?
by enriquto 4y ago
What is the point of this function? In rust, there's no equivalent to sprintf?
- mynameisvlad 4y agohttps://doc.rust-lang.org/std/fmt/ https://doc.rust-lang.org/std/fmt/ Different tools for the same job. One is explicitly integer to string conversion the other is sting formatting. You can technically use the latter, but some prefer a function which explicitly does one thing and one thing only.
- pie_flavor 4y agoMore accurately, some prefer a function that is statically dispatched and does not talk to std::fmt::Formatter.