Skip to content
New issue

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

Parameters for option feature #38

Closed
yanganto opened this issue Aug 12, 2024 · 0 comments · Fixed by #40
Closed

Parameters for option feature #38

yanganto opened this issue Aug 12, 2024 · 0 comments · Fixed by #40
Labels

Comments

@yanganto
Copy link
Owner

The critical behavior in option feature is about applying a patch on a None.

Now we use .into(), and let the user implement the From trait as the default behavior.
This is the reason the option featuredependence on From`.

It is nice to have some optional parameters for option to handle the other two possible use cases.

  • when applying a patch on none, the result will be none, such that the option feature will have no dependency
  • when applying a path on none, the result will be a patched default instance, so the option feature will not be dependent on From but from Default

ref:
#31 (comment)
#31 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant