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 most bundles. #12993

Merged
merged 1 commit into from
Apr 16, 2024
Merged

Conversation

Brezak
Copy link
Contributor

@Brezak Brezak commented Apr 16, 2024

Objective

Closes #12985.

Solution

  • Derive clone for most types with bundle in their name.
  • Bundle types missing clone:

@pablo-lua pablo-lua added A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use A-Cross-Cutting Impacts the entire engine labels Apr 16, 2024
@pablo-lua pablo-lua added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Apr 16, 2024
crates/bevy_audio/src/audio.rs Outdated Show resolved Hide resolved
@Brezak Brezak force-pushed the bundle-clone branch 3 times, most recently from 91b7779 to aade17d Compare April 16, 2024 16:03
@rlidwka
Copy link
Contributor

rlidwka commented Apr 16, 2024

TextBundle (Contains ContentSize which can't be cloned because it itself contains a Option where MeasureFunc isn't clone)

Can MeasureFunc be made clone? Maybe suggest to taffy maintainers to replace the Box with an Arc?

auto-merge was automatically disabled April 16, 2024 16:29

Head branch was pushed to by a user without write access

@Brezak
Copy link
Contributor Author

Brezak commented Apr 16, 2024

TextBundle (Contains ContentSize which can't be cloned because it itself contains a Option where MeasureFunc isn't clone)

Can MeasureFunc be made clone? Maybe suggest to taffy maintainers to replace the Box with an Arc?

MeasureFunc was removed in taffy 0.4.0.

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Apr 16, 2024
Merged via the queue into bevyengine:main with commit 368c5ce Apr 16, 2024
27 checks passed
@Brezak Brezak deleted the bundle-clone branch April 24, 2024 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Cross-Cutting Impacts the entire engine A-ECS Entities, components, systems, and events C-Usability A targeted 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.

Bevy's bundle types should implement Clone where possible
5 participants