Skip to content

Use `format!` instead of numtoa and concat

Andrey Turkin requested to merge andrey.turkin/termion:format into master

This is a revival of seemingly abandoned MR !184. I just rebased it and bumped libredox dependency. Original description follows:

The use of numtoa is not necessary; it adds an extra dependency and extra binary size.

  • [..., numtoa, ...].concat() is replaced with a format! -- allocation is necessary for concat anyway
  • From<...> for String is replaced with the to_string() method to reuse the existing Display impl

Merge request reports