We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MaybeUndefined
It might be nice if MaybeUndefined knew how to update an Option<T> in place. Something like this:
Option<T>
fn update_if_defined(self, current: &mut Option<T>) { match self { MaybeUndefined::Value(new) => *current = Some(new), MaybeUndefined::Null => *current = None, MaybeUndefined::Undefined => {}, }; }
What do you think? Worth thinking about whether this is a good name, too.
The text was updated successfully, but these errors were encountered:
This method is very useful. 🙂
Sorry, something went wrong.
Add MaybeUndefined::update_to method. #881
MaybeUndefined::update_to
9318c07
No branches or pull requests
Description of the feature
It might be nice if
MaybeUndefined
knew how to update anOption<T>
in place. Something like this:What do you think? Worth thinking about whether this is a good name, too.
The text was updated successfully, but these errors were encountered: