From 6ff5eb15a9d2b7b2dcfe1fe30c7ab3e002830b5f Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Wed, 6 Jul 2022 10:13:59 -0500 Subject: [PATCH] Appease Clippy. --- src/exploration.rs | 11 +++++++---- src/navigation.rs | 3 +-- src/sound/icon.rs | 3 +-- src/sound/mod.rs | 3 +-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/exploration.rs b/src/exploration.rs index d4cda04..3c8fc0d 100644 --- a/src/exploration.rs +++ b/src/exploration.rs @@ -438,20 +438,23 @@ impl Default for ExplorationConfig { } } -pub struct ExplorationPlugin<'a, S, A, D>(PhantomData<&'a S>, PhantomData<&'a A>, PhantomData); +pub struct ExplorationPlugin<'a, S: 'static, A: 'static, D>( + PhantomData<&'a S>, + PhantomData<&'static A>, + PhantomData, +); -impl<'a, S, A, D> Default for ExplorationPlugin<'a, S, A, D> { +impl Default for ExplorationPlugin<'static, S, A, D> { fn default() -> Self { Self(PhantomData, PhantomData, PhantomData) } } -impl<'a, S, A, D> Plugin for ExplorationPlugin<'a, S, A, D> +impl Plugin for ExplorationPlugin<'static, S, A, D> where S: Clone + Debug + Eq + Hash + Send + Sync, A: Hash + Eq + Clone + Send + Sync, D: 'static + Clone + Default + Send + Sync, - 'a: 'static, { fn build(&self, app: &mut App) { if !app.world.contains_resource::>() { diff --git a/src/navigation.rs b/src/navigation.rs index c59b284..86c8bc6 100644 --- a/src/navigation.rs +++ b/src/navigation.rs @@ -365,11 +365,10 @@ impl<'a, S, A> Default for NavigationPlugin<'a, S, A> { } } -impl<'a, S, A> Plugin for NavigationPlugin<'a, S, A> +impl Plugin for NavigationPlugin<'static, S, A> where S: 'static + Clone + Copy + Debug + Eq + Hash + Send + Sync, A: Hash + Eq + Copy + Send + Sync, - 'a: 'static, { fn build(&self, app: &mut App) { if !app.world.contains_resource::>() { diff --git a/src/sound/icon.rs b/src/sound/icon.rs index e645c2e..6f11717 100644 --- a/src/sound/icon.rs +++ b/src/sound/icon.rs @@ -287,10 +287,9 @@ impl<'a, S> Default for SoundIconPlugin<'a, S> { } } -impl<'a, S> Plugin for SoundIconPlugin<'a, S> +impl Plugin for SoundIconPlugin<'static, S> where S: 'static + Clone + Debug + Eq + Hash + Send + Sync, - 'a: 'static, { fn build(&self, app: &mut App) { app.add_system(added) diff --git a/src/sound/mod.rs b/src/sound/mod.rs index 4b9941b..f74173d 100644 --- a/src/sound/mod.rs +++ b/src/sound/mod.rs @@ -28,10 +28,9 @@ impl<'a, S> Default for SoundPlugin<'a, S> { } } -impl<'a, S> Plugin for SoundPlugin<'a, S> +impl Plugin for SoundPlugin<'static, S> where S: 'static + Clone + Debug + Eq + Hash + Send + Sync, - 'a: 'static, { fn build(&self, app: &mut App) { let _core_config = *app.world.get_resource::().unwrap();