Skip to content

Unhelpful error if a Edges struct contains two or more exclusive borrows of the same resource #4

@schell

Description

@schell

For example:

#[derive(CanFetch)]
struct SceneSetupData {
    entities: Write<Entities>,
    render_objects: RenderObjectData
}

will err during construction because RenderObjectData also has a Write<Entities>, but the error message is this:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: could not construct SceneSetupData

Caused by:
    'Write::construct' requested missing resource "apecs::world::Entities" encountered while building request: the borrow is exclusive and the resource is missing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions