We have a few places in our UI where we create a default value of some type when you click a button. This makes it cheaper to check if a type even has a default value, so you can show that in the UI before the user even clicks the button.
Previously your only option was to .default_value().is_some() which would build the whole data structure and likely do a bunch of allocations.
We have a few places in our UI where we create a default value of some type when you click a button. This makes it cheaper to check if a type even has a default value, so you can show that in the UI before the user even clicks the button.
Previously your only option was to
.default_value().is_some()
which would build the whole data structure and likely do a bunch of allocations.