-
-
Notifications
You must be signed in to change notification settings - Fork 4k
bevy_reflect: Introduce reflect_clone_and_take
.
#19944
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
base: main
Are you sure you want to change the base?
Conversation
|
reflect_clone_and_take
.reflect_clone_and_take
.
I would prefer a method. It's less noisy in the docs. |
87f364c
to
3c4207c
Compare
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple doc nits, but overall looks good!
Objective
There is a pattern that appears in multiple places, involving
reflect_clone
, followed bytake
, followed bymap_err
that produces aFailedDowncast
in a particular form.Solution
Introduces
reflect_clone_and_take
, which factors out the repeated code.Testing
cargo run -p ci