Skip to content

Commit

Permalink
cargo fmt nightly example doc code
Browse files Browse the repository at this point in the history
  • Loading branch information
Indra-db committed Sep 25, 2024
1 parent 505460f commit 940c31f
Showing 1 changed file with 31 additions and 8 deletions.
39 changes: 31 additions & 8 deletions flecs_ecs/src/core/entity_view/bulk_entity_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ impl<'a> BulkEntityBuilder<'a> {
/// use flecs_ecs::prelude::*;
///
/// #[derive(Component, Default)]
/// struct Position { x: i32, y: i32 }
/// struct Position {
/// x: i32,
/// y: i32,
/// }
///
/// let world = World::new();
///
Expand Down Expand Up @@ -175,7 +178,10 @@ impl<'a> BulkEntityBuilder<'a> {
/// use flecs_ecs::prelude::*;
///
/// #[derive(Component, Default)]
/// struct Position { x: i32, y: i32 }
/// struct Position {
/// x: i32,
/// y: i32,
/// }
///
/// let world = World::new();
///
Expand Down Expand Up @@ -212,7 +218,10 @@ impl<'a> BulkEntityBuilder<'a> {
/// use flecs_ecs::prelude::*;
///
/// #[derive(Component, Default)]
/// struct Position { x: i32, y: i32 }
/// struct Position {
/// x: i32,
/// y: i32,
/// }
///
/// let world = World::new();
///
Expand Down Expand Up @@ -252,10 +261,16 @@ impl<'a> BulkEntityBuilder<'a> {
/// use flecs_ecs::prelude::*;
///
/// #[derive(Component)]
/// struct Position { x: i32, y: i32 }
/// struct Position {
/// x: i32,
/// y: i32,
/// }
///
/// #[derive(Component, Default)]
/// struct Velocity { x: i32, y: i32 }
/// struct Velocity {
/// x: i32,
/// y: i32,
/// }
///
/// let world = World::new();
///
Expand Down Expand Up @@ -377,7 +392,10 @@ impl World {
/// use flecs_ecs::prelude::*;
///
/// #[derive(Component, Default)]
/// struct Position { x: i32, y: i32 }
/// struct Position {
/// x: i32,
/// y: i32,
/// }
///
/// let world = World::new();
///
Expand Down Expand Up @@ -405,15 +423,20 @@ impl World {
/// use flecs_ecs::prelude::*;
///
/// #[derive(Component, Default)]
/// struct Position { x: i32, y: i32 }
/// struct Position {
/// x: i32,
/// y: i32,
/// }
///
/// let world = World::new();
///
/// let positions: Vec<Position> = (0..10).map(|i| Position { x: i, y: i }).collect();
///
/// let entities: Vec<Entity> = (0..10).map(|_| world.entity().id()).collect();
/// let new_entities = world
/// .entity_bulk_w_entity_ids(&entities).set(&positions).build();
/// .entity_bulk_w_entity_ids(&entities)
/// .set(&positions)
/// .build();
/// ```
pub fn entity_bulk_w_entity_ids(&self, entities: &[impl Into<Entity>]) -> BulkEntityBuilder {
BulkEntityBuilder::new_w_entity_ids(self, entities)
Expand Down

0 comments on commit 940c31f

Please sign in to comment.