Fixed typo (#14636)

The closure in the `async_task` example was referred to as a `FnOne`. I
think this should be `FnOnce`.
This commit is contained in:
Paul Buehne 2024-08-06 19:35:35 +02:00 committed by GitHub
parent 2334638556
commit e7d40c9b08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -69,7 +69,7 @@ fn spawn_tasks(mut commands: Commands) {
let transform = Transform::from_xyz(x as f32, y as f32, z as f32); let transform = Transform::from_xyz(x as f32, y as f32, z as f32);
let mut command_queue = CommandQueue::default(); let mut command_queue = CommandQueue::default();
// we use a raw command queue to pass a FnOne(&mut World) back to be // we use a raw command queue to pass a FnOnce(&mut World) back to be
// applied in a deferred manner. // applied in a deferred manner.
command_queue.push(move |world: &mut World| { command_queue.push(move |world: &mut World| {
let (box_mesh_handle, box_material_handle) = { let (box_mesh_handle, box_material_handle) = {