Tidy up many open-coded trait impls
- Replace many open-coded
Defaultwith#[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
Cloneimpl. - Where
Defaultcallednew, but the functionality was sensibly available via#[derive(Default)], swap the call over so thatnewcallsDefault, 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