Skip to content

Tidy up many open-coded trait impls

Ian Jackson requested to merge Diziet/arti:derive-traits into main
  • 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 called new, but the functionality was sensibly available via #[derive(Default)], swap the call over so that new calls Default, 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

Merge request reports