Skip to content

Fix remaining `clippy::style`

Vincent Lafeychine requested to merge clippy/style into main

Part of #7.

This MR has fixed the remaining clippy::style lints.

The interesting commits are:

  • f10b1751: Use write_list!, started in !42 (merged)
  • e4b1a0e2: Use String::push_str (with the corresponding push_str_list! macro) instead of write!, which require disabling a clippy lint [1], considering the following interesting comments [2].

[1] See https://rust-lang.github.io/rust-clippy/master/index.html#/format_push_string: write! require doing an unwrap that cannot fail. However, String::push_str with a format! would require an unnecessary heap allocation, resulting in the clippy lint mentioned.

[2] See comments of https://github.com/rust-lang/rust-clippy/issues/9077

Edited by Vincent Lafeychine

Merge request reports

Loading