Warning
This post was published 56 days ago. The information described in this article may have changed.
Way too often, I encounter libraries that don't include clone/copy/debug/default (let alone those that don't include a new() method for structs!). The lack of standard features through pure calelessness is outright painful.
Is there a way instead of defaulting structs to no clone/copy/debug/default unless stated otherwise, default to ALL structs deriving clone/copy/debug/default unless stated otherwise (especially those in crates I've added to my project.... can't count the number of times I've needed a default of a struct for a unit test but there is none, and frequently no new() function either! Forcing me to generate them through long methods instead of just calling a default or new on the struct and throwing in a few edge cases.) It's inefficient and counter-intuitive the way it currently is.
4 posts - 4 participants
🏷️ rust_feed