Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix panics and docs when using World schedules (#8364)
# Objective The method `World::try_run_schedule` currently panics if the `Schedules` resource does not exist, but it should just return an `Err`. Similarly, `World::add_schedule` panics unnecessarily if the resource does not exist. Also, the documentation for `World::add_schedule` is completely wrong. ## Solution When the `Schedules` resource does not exist, we now treat it the same as if it did exist but was empty. When calling `add_schedule`, we initialize it if it does not exist.
- Loading branch information