Skip to content

Commit

Permalink
Fix the examples in the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
idanarye committed Jul 6, 2024
1 parent 3dcb7e4 commit df0c49c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/level_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub struct YoleckLevelIndexEntry {
/// let level_index_handle = level_index_handle
/// .get_or_insert_with(|| asset_server.load("levels/index.yoli"))
/// .clone();
/// let Some(level_index) = level_index_assets.get(level_index_handle) else {
/// let Some(level_index) = level_index_assets.get(&level_index_handle) else {
/// // During the first invocation of this system, the level index asset is not going to be
/// // loaded just yet. Since this system is going to run on every frame during the Loading
/// // state, it just has to keep trying until it starts in a frame where it is loaded.
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
//! populate.populate(|_ctx, mut cmd, rectangle| {
//! cmd.insert(SpriteBundle {
//! sprite: Sprite {
//! color: Color::RED,
//! color: bevy::color::palettes::css::RED.into(),
//! custom_size: Some(Vec2::new(rectangle.width, rectangle.height)),
//! ..Default::default()
//! },
Expand All @@ -163,7 +163,7 @@
//! let level_index_handle = level_index_handle
//! .get_or_insert_with(|| asset_server.load("levels/index.yoli"))
//! .clone();
//! let Some(level_index) = level_index_assets.get(level_index_handle) else {
//! let Some(level_index) = level_index_assets.get(&level_index_handle) else {
//! // During the first invocation of this system, the level index asset is not going to be
//! // loaded just yet. Since this system is going to run on every frame during the Loading
//! // state, it just has to keep trying until it starts in a frame where it is loaded.
Expand Down Expand Up @@ -628,7 +628,7 @@ pub(crate) struct YoleckState {
/// use bevy::ecs::system::SystemState;
/// # use bevy_yoleck::{YoleckEditorSections, egui};
/// # let mut app = App::new();
/// app.world.resource_mut::<YoleckEditorSections>().0.push((|world: &mut World| {
/// app.world_mut().resource_mut::<YoleckEditorSections>().0.push((|world: &mut World| {
/// let mut system_state = SystemState::<(
/// Res<Time>,
/// )>::new(world);
Expand Down

0 comments on commit df0c49c

Please sign in to comment.