itertools
itertools copied to clipboard
FormatWith should use a Cell
The RefCell
is unnecessary, as all we're doing is .take()
, which is also available on Cell
: https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.take
https://github.com/rust-itertools/itertools/blob/943494c2be3977a42df701dfde90d903ae17d16d/src/format.rs#L14
This results in using more memory and generating more code than necessary.