Skip to content

Combine trait example is out of date #22363

@BD103

Description

@BD103

In Bevy 0.17 if one of the systems in a system combinator could not be run, the combinator would exit early (using ?). This was changed in #20671 to assume invalid systems returned false, and continue with the combinator logic (using unwrap_or(false)):

Ok(a(input, data).unwrap_or(false) ^ b(input, data).unwrap_or(false))

The example for the Combine trait does not reflect this, though:

/// Ok(a((), data)? ^ b((), data)?)

This example should be updated to use unwrap_or(false):

Ok(a((), data).unwrap_or(false) ^ b((), data).unwrap_or(false))

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-DocsAn addition or correction to our documentationD-TrivialNice and easy! A great choice to get started with BevyS-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