Hi
Thanks for making this repo; it's full of great macros!
One thing I write a lot is this:
pub struct MyStruct(Vec<i32>) // or HashSet or BTreeMap
impl MyStruct {
#[must_use]
pub const fn is_empty(&self) -> bool {
self.0.is_empty()
}
#[must_use]
pub const fn len(&self) -> usize {
self.0.len()
}
...
}
I would like it a lot if I could derive this. And it's common enough (for me at least) that I would find a lot of value from it. The #[must_use] and const are just to satisfy clippy, and I think they aren't needed.
What do you think? How difficult would this be to implement?
Hi
Thanks for making this repo; it's full of great macros!
One thing I write a lot is this:
I would like it a lot if I could derive this. And it's common enough (for me at least) that I would find a lot of value from it. The
#[must_use]andconstare just to satisfy clippy, and I think they aren't needed.What do you think? How difficult would this be to implement?