Fix remaining `clippy::style`
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 correspondingpush_str_list!
macro) instead ofwrite!
, 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