-
Notifications
You must be signed in to change notification settings - Fork 11
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
Deduplicate Clone by always using match
and { }
#31
base: master
Are you sure you want to change the base?
Commits on Aug 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for e4e505d - Browse repository at this point
Copy the full SHA e4e505dView commit details -
Preparation: Impl IdentFragment for IdentOrIndex
We'll use this in a moment.
Configuration menu - View commit details
-
Copy full SHA for 62bc987 - Browse repository at this point
Copy the full SHA 62bc987View commit details -
Introduce FieldInfo and use in clone_enum
No functional change, but this prepares the code for unification of handling of named and unnamed fields.
Configuration menu - View commit details
-
Copy full SHA for aead687 - Browse repository at this point
Copy the full SHA aead687View commit details -
Use braced syntax even for tuple and units, in clone_enum
Demonstrate the named-vs-unnamed-agnostic approach. Unit, Named and Unnamed are all now handled by the named fields code, using the `{ }` syntax which Rust allows for every `Data`. The `match` statement is redundant, but removing it will involve a deindent so is very textually invasive. We'll do that in the next commit.
Configuration menu - View commit details
-
Copy full SHA for 10cd174 - Browse repository at this point
Copy the full SHA 10cd174View commit details -
Post-unification cleanup: remove now-redundant match
Best reviewed with `git show -b`.
Configuration menu - View commit details
-
Copy full SHA for 3324410 - Browse repository at this point
Copy the full SHA 3324410View commit details -
Configuration menu - View commit details
-
Copy full SHA for 941b9b2 - Browse repository at this point
Copy the full SHA 941b9b2View commit details -
Use match approach for struct clone
The clone_enum code is now good for cloning structs. Use it. The redundant block will be removed in a moment.
Configuration menu - View commit details
-
Copy full SHA for 1accc1d - Browse repository at this point
Copy the full SHA 1accc1dView commit details -
Post-unification cleanup: Remove redundant block
Best reviewed with `git show -b`
Configuration menu - View commit details
-
Copy full SHA for 461123b - Browse repository at this point
Copy the full SHA 461123bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 831b9e1 - Browse repository at this point
Copy the full SHA 831b9e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 869dff8 - Browse repository at this point
Copy the full SHA 869dff8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1abd260 - Browse repository at this point
Copy the full SHA 1abd260View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4329fe8 - Browse repository at this point
Copy the full SHA 4329fe8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7434288 - Browse repository at this point
Copy the full SHA 7434288View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8728777 - Browse repository at this point
Copy the full SHA 8728777View commit details