This is my first contribution to this exciting project! Thanks so much for your wonderful work. If there is anything that I can improve about this PR, please let me know :) # Objective - Fixes #2899 - If a simple one-off command is needed to be added within a System, this simplifies that process so that we can simply do `commands.add(|world: &mut World| { /* code here */ })` instead of defining a custom type implementing `Command`. ## Solution - This is achieved by `impl Command for F where F: FnOnce(&mut World) + Send + Sync + 'static` as just calling the function. I am not sure if the bounds can be further relaxed but needed the whole `Send`, `Sync`, and `'static` to get it to compile. |
||
|---|---|---|
| .. | ||
| entity | ||
| query | ||
| schedule | ||
| storage | ||
| system | ||
| world | ||
| archetype.rs | ||
| bundle.rs | ||
| change_detection.rs | ||
| component.rs | ||
| event.rs | ||
| lib.rs | ||
| reflect.rs | ||