diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs index 01f317e3ed6b76..6f57b2dd0e4a6b 100644 --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -291,6 +291,17 @@ where } impl<'w, T: Resource> Res<'w, T> { + // no it shouldn't clippy + #[allow(clippy::should_implement_trait)] + pub fn clone(this: &Self) -> Self { + Self { + value: this.value, + ticks: this.ticks, + last_change_tick: this.last_change_tick, + change_tick: this.change_tick, + } + } + /// Returns `true` if the resource was added after the system last ran. pub fn is_added(&self) -> bool { self.ticks.is_added(self.last_change_tick, self.change_tick)