It’s format! that allocates. It evaluates to a String, and String is heap-backed.
If you want to avoid allocation, use write! instead.
It’s format! that allocates. It evaluates to a String, and String is heap-backed.
If you want to avoid allocation, use write! instead.