-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
bevyengine/bevy-website
#2245Labels
A-PointersRelating to Bevy pointer abstractionsRelating to Bevy pointer abstractionsC-DocsAn addition or correction to our documentationAn addition or correction to our documentationC-FeatureA new feature, making something new possibleA new feature, making something new possibleD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesSimple bug fixes and API improvements, docs, test and examplesM-Migration-GuideA breaking change to Bevy's public API that needs to be noted in a migration guideA breaking change to Bevy's public API that needs to be noted in a migration guideS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!
Milestone
Description
What problem does this solve or what need does it fill?
While migrating BEI's SpawnableList impls, this pattern came up often:
// 0.16
let foo = something;
foo.spawn(world, entity);But foo is now required to be MovingPtr! I first built it manually using unsafe until I stumbled on move_as_ptr.
the correct way is now:
// 0.17
let foo = something;
move_as_ptr!(foo);
SpawnableList::spawn(foo, world, entity);Metadata
Metadata
Assignees
Labels
A-PointersRelating to Bevy pointer abstractionsRelating to Bevy pointer abstractionsC-DocsAn addition or correction to our documentationAn addition or correction to our documentationC-FeatureA new feature, making something new possibleA new feature, making something new possibleD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesSimple bug fixes and API improvements, docs, test and examplesM-Migration-GuideA breaking change to Bevy's public API that needs to be noted in a migration guideA breaking change to Bevy's public API that needs to be noted in a migration guideS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!