Skip to content

Commit

Permalink
Merge #513
Browse files Browse the repository at this point in the history
513: Uncomment example code. r=torkleyy a=yuvallanger

Sorry if I am getting in your way. Maybe it should have been an "issue" and not a "pull request".

Why comment out good example code? Maybe add a comment on line 39 a comment saying this is what you are referring to? Notice I haven't added anything to the for loop's body.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/slide-rs/specs/513)
<!-- Reviewable:end -->


Co-authored-by: Yuval Langer <[email protected]>
  • Loading branch information
bors[bot] and yuvallanger committed Nov 21, 2018
2 parents f0b7377 + a201a53 commit df24334
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/storage/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,17 @@ use world::{Component, EntitiesRes};
/// something like this:
///
/// ```
/// # use specs::prelude::*;
/// #
/// # struct Pos; impl Component for Pos { type Storage = VecStorage<Self>; }
/// # struct Vel; impl Component for Vel { type Storage = VecStorage<Self>; }
/// #
/// # let mut world = World::new(); world.register::<Pos>(); world.register::<Vel>();
/// # let pos_storage = world.read_storage::<Pos>();
/// # let vel_storage = world.read_storage::<Vel>();
/// (&pos_storage, &vel_storage).join()
/// # ;
/// use specs::prelude::*;
///
/// struct Pos; impl Component for Pos { type Storage = VecStorage<Self>; }
/// struct Vel; impl Component for Vel { type Storage = VecStorage<Self>; }
///
/// let mut world = World::new(); world.register::<Pos>(); world.register::<Vel>();
/// let pos_storage = world.read_storage::<Pos>();
/// let vel_storage = world.read_storage::<Vel>();
///
/// for (pos, vel) in (&pos_storage, &vel_storage).join() {
/// }
/// ```
///
/// This joins the position and the velocity storage, which means it only
Expand Down

0 comments on commit df24334

Please sign in to comment.