-
Notifications
You must be signed in to change notification settings - Fork 358
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
Make "mem::replace to keep owned values in changed enums" example more general #38
Comments
Hmm, I tend to agree. The original PR used a |
I use |
I don't we can say |
Maybe it's good to have two examples, one with |
* Add another example to the mem::replace idiom This fixes #38 * New anti-pattern: deny-warnings * added deprecated link * fix link title, add explanation why not deprecated * incorporated hints from lfairy
The example seems unrealistic because it uses
if let
instead ofmatch
. The example should usematch
since it is more general. Most of the cases where I would use this pattern would require the use ofmatch
.The text was updated successfully, but these errors were encountered: