Skip to content

Commit 83b602a

Browse files
committed
Relax Sync bound on anonymous Commands (#7014)
# Objective Any closure with the signature `FnOnce(&mut World)` implicitly implements the trait `Command` due to a blanket implementation. However, this implementation unnecessarily has the `Sync` bound, which limits the types that can be used. ## Solution Remove the bound. --- ## Changelog - `Command` closures no longer need to implement the marker trait `std::marker::Sync`.
1 parent b3d5906 commit 83b602a

File tree

1 file changed

+1
-1
lines changed
  • crates/bevy_ecs/src/system/commands

1 file changed

+1
-1
lines changed

crates/bevy_ecs/src/system/commands/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ impl<'w, 's, 'a> EntityCommands<'w, 's, 'a> {
709709

710710
impl<F> Command for F
711711
where
712-
F: FnOnce(&mut World) + Send + Sync + 'static,
712+
F: FnOnce(&mut World) + Send + 'static,
713713
{
714714
fn write(self, world: &mut World) {
715715
self(world);

0 commit comments

Comments
 (0)