8000 Remove the `actions` argument from `Model::actions` and return the actions · Issue #52 · stateright/stateright · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Remove the actions argument from Model::actions and return the actions #52
Open
@HaoYang670

Description

@HaoYang670

In the definition of Module::actions, the argument actions: &mut Vec<Self::Action> is just used to be pushed the result in. This makes no sense because it should be the caller to decide how to use the returned actions, and it also introduces a mut reference.

Instead, I'd like the definition of Module::actions to be

fn actions(&self, state: &Self::State) -> Vec<Self::Action>

, and it could also make the API consistent with next_steps and next_states

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0