Skip to content

Make reflect::Map::drain and reflect::List::drain take a mutable borrow instead of Box<Self>. #15185

@andriyDev

Description

@andriyDev

What problem does this solve or what need does it fill?

Draining a map or list does not require an owned value - it only requires a mutable borrow. However our reflection API does require consuming an owned value.

What solution would you like?

Make drain for Map and List take a mutable borrow!

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ReflectionRuntime information about typesC-UsabilityA targeted quality-of-life change that makes Bevy easier to useD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions