Skip to content

Commit 87b8879

Browse files
committed
map_err
1 parent 0b91637 commit 87b8879

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

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

+1-4
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,7 @@ impl<
116116
{
117117
move |world: &mut World| {
118118
let entity = world.get_entity_mut(entity)?;
119-
match self.apply(entity) {
120-
Ok(result) => Ok(result),
121-
Err(err) => Err(EntityCommandError::Error(err)),
122-
}
119+
self.apply(entity).map_err(EntityCommandError::Error)
123120
}
124121
}
125122
}

0 commit comments

Comments
 (0)