Skip to content

Commit

Permalink
Fix (all?) CI warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
benfrankel committed Aug 17, 2024
1 parent 1e0c688 commit 5fe39f4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,7 @@ iyes_progress = "0.12"

[lints.rust]
missing_docs = "deny"

[lints.clippy]
too_many_arguments = "allow"
type_complexity = "allow"
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
//! # Overview
//!
//! 1. The current state is a [`Resource`](bevy_ecs::system::Resource) or
//! [`Component`](bevy_ecs::component::Component) that implements [`State`](state::State).
//! [`Component`](bevy_ecs::component::Component) that implements [`State`](state::State).
//! 2. The [next state](next_state) is stored in a
//! [`NextStateBuffer`](next_state::buffer::NextStateBuffer) resource by default.
//! [`NextStateBuffer`](next_state::buffer::NextStateBuffer) resource by default.
//! 3. A state flush is triggered by the [`TriggerStateFlush`](next_state::TriggerStateFlush)
//! resource and handled in the [`StateFlush`](schedule::StateFlush) schedule.
//! resource and handled in the [`StateFlush`](schedule::StateFlush) schedule.
//! 4. State flush hooks are organized into [`ResolveStateSet`](schedule::ResolveStateSet)
//! system sets.
//! system sets.
//! 5. Tools are provided for state [setup], [access], [pattern-matching](pattern),
//! [debugging](debug), and [more](extra).
//! [debugging](debug), and [more](extra).
//!
//! # Getting started
//!
Expand Down
4 changes: 2 additions & 2 deletions src/schedule/flush_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ mod app {
};

/// A plugin that adds a [`StateFlushEvent<S>`] sending system for the [`State`] type `S`
/// to the [`StateFlush`](crate::schedule::StateFlush) schedule.
/// to the [`StateFlush`] schedule.
///
/// Calls [`schedule_flush_event<S>`].
pub struct FlushEventPlugin<S: State + Clone>(std::marker::PhantomData<S>);
Expand All @@ -38,7 +38,7 @@ mod app {
}

/// A plugin that adds a [`LocalStateFlushEvent<S>`] sending system for the [`State`] type `S`
/// to the [`StateFlush`](crate::schedule::StateFlush) schedule.
/// to the [`StateFlush`] schedule.
///
/// Calls [`schedule_local_flush_event<S>`].
pub struct LocalFlushEventPlugin<S: State + Clone>(PhantomData<S>);
Expand Down
2 changes: 1 addition & 1 deletion src/schedule/resolve_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ use crate::{schedule::ApplyFlushSet, state::State};
/// [`ResolveStatePlugin<S>`] as follows:
///
/// 1. [`Resolve`](Self::Resolve) (before or after other `Resolve` system sets based on
/// state dependencies, and before [`ApplyFlushSet`])
/// state dependencies, and before [`ApplyFlushSet`])
/// 1. [`Compute`](Self::Compute)
/// 2. [`Trigger`](Self::Trigger)
/// 3. [`Flush`](Self::Flush) (and [`AnyFlush`](Self::AnyFlush) if the global state will flush)
Expand Down
4 changes: 2 additions & 2 deletions src/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ mod app {
///
/// - Adds the [`StateFlush`] schedule to the [`MainScheduleOrder`] after [`PreUpdate`].
/// - Adds the [`bevy_state` plugin](bevy_state::app::StatesPlugin) if the
/// `bevy_state` feature is enabled.
/// `bevy_state` feature is enabled.
pub struct StatePlugin;

impl Plugin for StatePlugin {
Expand Down Expand Up @@ -191,7 +191,7 @@ impl EntityCommandsExtState for EntityCommands<'_> {
fn init_state<S: LocalState<Next: FromWorld>>(&mut self) {
self.add(|mut entity: EntityWorldMut| {
if !local_state_exists::<S>(&entity) {
let next = entity.world_scope(|world| S::Next::from_world(world));
let next = entity.world_scope(S::Next::from_world);
insert_local_state(&mut entity, Some(next));
}
});
Expand Down

0 comments on commit 5fe39f4

Please sign in to comment.