Skip to content

Commit df0c49c

Browse files
committed
Fix the examples in the docs
1 parent 3dcb7e4 commit df0c49c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/level_index.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub struct YoleckLevelIndexEntry {
3333
/// let level_index_handle = level_index_handle
3434
/// .get_or_insert_with(|| asset_server.load("levels/index.yoli"))
3535
/// .clone();
36-
/// let Some(level_index) = level_index_assets.get(level_index_handle) else {
36+
/// let Some(level_index) = level_index_assets.get(&level_index_handle) else {
3737
/// // During the first invocation of this system, the level index asset is not going to be
3838
/// // loaded just yet. Since this system is going to run on every frame during the Loading
3939
/// // state, it just has to keep trying until it starts in a frame where it is loaded.

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
//! populate.populate(|_ctx, mut cmd, rectangle| {
137137
//! cmd.insert(SpriteBundle {
138138
//! sprite: Sprite {
139-
//! color: Color::RED,
139+
//! color: bevy::color::palettes::css::RED.into(),
140140
//! custom_size: Some(Vec2::new(rectangle.width, rectangle.height)),
141141
//! ..Default::default()
142142
//! },
@@ -163,7 +163,7 @@
163163
//! let level_index_handle = level_index_handle
164164
//! .get_or_insert_with(|| asset_server.load("levels/index.yoli"))
165165
//! .clone();
166-
//! let Some(level_index) = level_index_assets.get(level_index_handle) else {
166+
//! let Some(level_index) = level_index_assets.get(&level_index_handle) else {
167167
//! // During the first invocation of this system, the level index asset is not going to be
168168
//! // loaded just yet. Since this system is going to run on every frame during the Loading
169169
//! // state, it just has to keep trying until it starts in a frame where it is loaded.
@@ -628,7 +628,7 @@ pub(crate) struct YoleckState {
628628
/// use bevy::ecs::system::SystemState;
629629
/// # use bevy_yoleck::{YoleckEditorSections, egui};
630630
/// # let mut app = App::new();
631-
/// app.world.resource_mut::<YoleckEditorSections>().0.push((|world: &mut World| {
631+
/// app.world_mut().resource_mut::<YoleckEditorSections>().0.push((|world: &mut World| {
632632
/// let mut system_state = SystemState::<(
633633
/// Res<Time>,
634634
/// )>::new(world);

0 commit comments

Comments
 (0)