Skip to content

Commit

Permalink
fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
IceSentry committed Sep 10, 2021
1 parent 3509c44 commit 973b705
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions crates/bevy_ecs/src/system/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,11 +496,10 @@ where
/// # Example
///
/// ```
/// # use bevy_ecs::system::Query;
/// # use bevy_ecs::prelude::IntoSystem;
/// # use bevy_math::Vec2;
/// # use bevy_ecs::prelude::{IntoSystem, Query, With};
/// struct Player;
/// fn player_system(query: Query<&Vec2, With<Player>>) {
/// struct Position(f32, f32);
/// fn player_system(query: Query<&Position, With<Player>>) {
/// let player_position = query.single();
/// // do something with player_position
/// }
Expand All @@ -525,11 +524,11 @@ where
/// # Examples
///
/// ```
/// # use bevy_ecs::prelude::{IntoSystem, With};
/// # use bevy_ecs::system::{Query, QuerySingleError};
/// # use bevy_ecs::prelude::IntoSystem;
/// # use bevy_math::Vec2;
/// struct Player;
/// fn player_system(query: Query<&Vec2, With<Player>>) {
/// struct Position(f32, f32);
/// fn player_system(query: Query<&Position, With<Player>>) {
/// match query.try_single() {
/// Ok(position) => {
/// // do something with position
Expand Down

0 comments on commit 973b705

Please sign in to comment.