Java is probably able to bump allocate memory or something similar, where rust is using a general purpose allocator.
I guess if you are formatting strings constantly this is important, but you can also use a bump allocator in rust if you really wanted to.