docs fixes

This commit is contained in:
Tim Blackbird 2025-07-15 20:16:43 +02:00
parent 4d82820e97
commit 9154556d97
3 changed files with 7 additions and 8 deletions

View File

@ -1320,7 +1320,7 @@ impl App {
/// #
/// # let mut app = App::new();
/// #
/// # #[derive(Event)]
/// # #[derive(BroadcastEvent)]
/// # struct Party {
/// # friends_allowed: bool,
/// # };

View File

@ -44,7 +44,7 @@ use crate::prelude::ReflectComponent;
/// ```
/// # use bevy_ecs::prelude::*;
/// # let mut world = World::default();
/// #[derive(Event)]
/// #[derive(BroadcastEvent)]
/// struct Speak {
/// message: String,
/// }
@ -67,7 +67,7 @@ use crate::prelude::ReflectComponent;
/// ```
/// # use bevy_ecs::prelude::*;
/// # let mut world = World::default();
/// # #[derive(Event)]
/// # #[derive(BroadcastEvent)]
/// # struct Speak;
/// // These are functionally the same:
/// world.add_observer(|trigger: On<Speak>| {});
@ -79,7 +79,7 @@ use crate::prelude::ReflectComponent;
/// ```
/// # use bevy_ecs::prelude::*;
/// # let mut world = World::default();
/// # #[derive(Event)]
/// # #[derive(BroadcastEvent)]
/// # struct PrintNames;
/// # #[derive(Component, Debug)]
/// # struct Name;
@ -97,7 +97,7 @@ use crate::prelude::ReflectComponent;
/// ```
/// # use bevy_ecs::prelude::*;
/// # let mut world = World::default();
/// # #[derive(Event)]
/// # #[derive(BroadcastEvent)]
/// # struct SpawnThing;
/// # #[derive(Component, Debug)]
/// # struct Thing;
@ -111,9 +111,9 @@ use crate::prelude::ReflectComponent;
/// ```
/// # use bevy_ecs::prelude::*;
/// # let mut world = World::default();
/// # #[derive(Event)]
/// # #[derive(BroadcastEvent)]
/// # struct A;
/// # #[derive(Event)]
/// # #[derive(BroadcastEvent)]
/// # struct B;
/// world.add_observer(|trigger: On<A>, mut commands: Commands| {
/// commands.trigger(B);

View File

@ -1,5 +1,4 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
//! [![Bevy Logo](https://bevy.org/assets/bevy_logo_docs.svg)](https://bevy.org)
//!
//! Bevy is an open-source modular game engine built in Rust, with a focus on developer productivity