Skip to content

Commit 38ffe2c

Browse files
committed
Try not using 'static
1 parent fb464a7 commit 38ffe2c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/bevy_gilrs/src/gilrs_system.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{borrow::BorrowMut, ops::Deref};
1+
use std::ops::Deref;
22

33
use crate::{
44
converter::{convert_axis, convert_button},
@@ -15,11 +15,11 @@ use gilrs::{ev::filter::axis_dpad_to_button, EventType, Filter};
1515

1616
pub fn gilrs_event_startup_system(
1717
mut commands: Commands,
18-
gilrs: Res<'static, Gilrs>,
18+
gilrs: Res<Gilrs>,
1919
mut gamepads: ResMut<GilrsGamepads>,
2020
mut events: EventWriter<GamepadConnectionEvent>,
2121
) {
22-
gilrs.into_inner().0.with(|g_ref| {
22+
gilrs.0.with(|g_ref| {
2323
if let Some(g) = g_ref.borrow().deref() {
2424
for (id, gamepad) in g.gamepads() {
2525
// Create entity and add to mapping

0 commit comments

Comments
 (0)