Skip to content

Missing migration: SpawnableList migration does not mention move_as_ptr #21194

@janhohenheim

Description

@janhohenheim

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

No one assigned

    Labels

    A-PointersRelating to Bevy pointer abstractionsC-DocsAn addition or correction to our documentationC-FeatureA new feature, making something new possibleD-StraightforwardSimple 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 guideS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions