Tidy up many open-coded trait impls
- Replace many open-coded
Default
with#[derive]
. I chose not to replace all that could be replaced; in general, I avoided doing so when it would involve implicitly assigning zero to numeric parameters. - Replace one unnecessary open-coded
Clone
impl. - Where
Default
callednew
, but the functionality was sensibly available via#[derive(Default)]
, swap the call over so thatnew
callsDefault
, and use the derive. - Some minor debug improvements.
These changes are ones I came across while working on #366 (closed), for which I did a grep for manual impls of Clone
, Debug
, and Default
.
Edited by Ian Jackson