iolivia / rust-sokoban

Rust Sokoban book and code samples
https://sokoban.iolivia.me
MIT License
155 stars 29 forks source link

Remove unnecessary `to_string` calls #64

Closed pwoolcoc closed 4 years ago

pwoolcoc commented 4 years ago

Since format! returns a string, there is no reason to call format!().to_string().

Also, since the "{}" formatting specifier calls .to_string() on it's argument, there is no reason to call .to_string() on the argument ourselves.

iolivia commented 4 years ago

this is perfect, thank you! 🚀