Closed RustyNova016 closed 4 months ago
I'm not convinced that this is worth the added complexity; as you demonstrated, there is a syntax for this already in the language, and we'd need to think about how it interacted with all the other kinds of setters before introducing it.
A thing missing from the crate is the ability to conditionally insert a value if the Option containing it if it is Some. This would reduce the amount of boilerplate when mapping a struct to another.
For exemple, here is the current way to do it:
A better way would be: