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

Implement Clone for VisibilityBundle and SpatialBundle #10394

Merged
merged 2 commits into from
Nov 7, 2023

Conversation

doonv
Copy link
Contributor

@doonv doonv commented Nov 5, 2023

Objective

Had an issue where I had VisibilityBundle inside a bundle that implements Clone, but since VisibilityBundle doesn't implement Clone that wasn't possible. This PR fixes that.

Solution

Implement Clone for VisibilityBundle by deriving it. And also SpatialBundle too because why not.


Changelog

  • Added implementation for Clone on VisibilityBundle and SpatialBundle.

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check if SpatialBundle (and ideally our other premade bundle types) need this treatment too?

@doonv
Copy link
Contributor Author

doonv commented Nov 5, 2023

Good call, I Implemented Clone for SpatialBundle too. I checked and I don't think theres a common bundle that also requires this treatment.

@doonv doonv changed the title Implement Clone for VisibilityBundle Implement Clone for VisibilityBundle and SpatialBundle Nov 5, 2023
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Nov 6, 2023
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Usability A simple quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Nov 6, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 6, 2023
@doonv
Copy link
Contributor Author

doonv commented Nov 6, 2023

Huh, why did it fail building wasm?

@alice-i-cecile
Copy link
Member

Looks like a semver violating change / new bug in one of our dependencies :(

We may need to pin async_executor: smol-rs/async-executor#72 (thanks @Bluefinger).

@james7132 james7132 added this to the 0.13 milestone Nov 7, 2023
@james7132 james7132 added this pull request to the merge queue Nov 7, 2023
Merged via the queue into bevyengine:main with commit 4852fc7 Nov 7, 2023
24 checks passed
rdrpenguin04 pushed a commit to rdrpenguin04/bevy that referenced this pull request Jan 9, 2024
)

# Objective

Had an issue where I had `VisibilityBundle` inside a bundle that
implements `Clone`, but since `VisibilityBundle` doesn't implement
`Clone` that wasn't possible. This PR fixes that.

## Solution

Implement `Clone` for `VisibilityBundle` by deriving it. And also
`SpatialBundle` too because why not.

---

## Changelog

- Added implementation for `Clone` on `VisibilityBundle` and
`SpatialBundle`.
@doonv doonv deleted the impl-clone-for-visiblity-bundle branch January 21, 2024 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Usability A simple quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants