carbotaniuman / auto_ops

Macros for overloading operators easily in Rust.
MIT License
34 stars 9 forks source link

unused_mut: variable does not need to be mutable on impl_op_ex #15

Closed Edgeworth closed 1 year ago

Edgeworth commented 1 year ago

I found that on this code:

impl_op_ex!(+= |a: &mut Val, b: &Val| { a.qty += b.qty; });

I get a warning with unused_mut: variable does not need to be mutable

Looks like the mut here https://github.com/carbotaniuman/auto_ops/blob/74d97b4fb0f39e73c7fd63934c877c91a2c4a031/src/assignment.rs#L39 and the one below that is either not necessary (remove it) or not always necessary (add allow unused_mut).

Edgeworth commented 7 months ago

Thanks for fixing. If it's not too much trouble, could you do a point release for this?