From ecc400637857422874d26b9f393582cba5d6680b Mon Sep 17 00:00:00 2001 From: JoJoJet <21144246+JoJoJet@users.noreply.github.com> Date: Tue, 17 Jan 2023 01:39:19 +0000 Subject: [PATCH] Remove an incorrect impl of `ReadOnlySystemParam` for `NonSendMut` (#7243) # Objective The trait `ReadOnlySystemParam` is implemented for `NonSendMut`, when it should not be. This mistake was made in #6919. ## Solution Remove the incorrect impl. --- crates/bevy_ecs/src/system/system_param.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs index e08326f8868a7f..921bba36b27103 100644 --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -1012,9 +1012,6 @@ unsafe impl SystemParam for Option> { } } -// SAFETY: Only reads a single non-send resource -unsafe impl<'a, T: 'static> ReadOnlySystemParam for NonSendMut<'a, T> {} - // SAFETY: NonSendMut ComponentId and ArchetypeComponentId access is applied to SystemMeta. If this // NonSendMut conflicts with any prior access, a panic will occur. unsafe impl<'a, T: 'static> SystemParam for NonSendMut<'a, T> {