Skip to content

Commit 1c83a03

Browse files
committed
resolve conflicts and fix
1 parent 039933f commit 1c83a03

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

crates/bevy_ecs/hecs/macros/src/lib.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ use proc_macro::TokenStream;
2222
use proc_macro2::{Span, TokenStream as TokenStream2};
2323
use proc_macro_crate::crate_name;
2424
use quote::quote;
25-
use syn::{parse_macro_input, DeriveInput, Error, Ident, Index, Lifetime, Path, Result};
2625
use syn::{
27-
parse::ParseStream, parse_macro_input, Data, DataStruct, DeriveInput, Field, Fields, Ident,
28-
Index, Lifetime, Path,
26+
parse::ParseStream, parse_macro_input, Data, DataStruct, DeriveInput, Error, Field, Fields,
27+
Ident, Index, Lifetime, Path, Result,
2928
};
3029

3130
/// Implement `Bundle` for a monomorphic struct

crates/bevy_ecs/src/system/system_param.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub trait SystemParam: Sized {
1212
fn init(system_state: &mut SystemState, world: &World, resources: &mut Resources);
1313
/// # Safety
1414
/// This call might access any of the input parameters in a safe way. Make sure the data access is safe in
15-
/// the context of the system scheduler
15+
/// the context of the system scheduler
1616
unsafe fn get_param(
1717
system_state: &mut SystemState,
1818
world: &World,

examples/2d/contributors.rs

+10-7
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,16 @@ const COL_SELECTED: Color = Color::rgb_linear(5.0, 5.0, 5.0);
4646
const SHOWCASE_TIMER_SECS: f32 = 3.0;
4747

4848
fn setup(
49-
mut cmd: Commands,
49+
commands: &mut Commands,
5050
asset_server: Res<AssetServer>,
5151
mut materials: ResMut<Assets<ColorMaterial>>,
5252
) {
5353
let contribs = contributors();
5454

5555
let texture_handle = asset_server.load("branding/icon.png");
5656

57-
cmd.spawn(Camera2dComponents::default())
57+
commands
58+
.spawn(Camera2dComponents::default())
5859
.spawn(UiCameraComponents::default());
5960

6061
let mut sel = ContributorSelection {
@@ -76,7 +77,8 @@ fn setup(
7677
let mut transform = Transform::from_translation(Vec3::new(pos.0, pos.1, 0.0));
7778
*transform.scale.x_mut() *= if flipped { -1.0 } else { 1.0 };
7879

79-
cmd.spawn((Contributor { color: col },))
80+
commands
81+
.spawn((Contributor { color: col },))
8082
.with(Velocity {
8183
translation: velocity,
8284
rotation: -dir * 5.0,
@@ -94,16 +96,17 @@ fn setup(
9496
})
9597
.with(transform);
9698

97-
let e = cmd.current_entity().unwrap();
99+
let e = commands.current_entity().unwrap();
98100

99101
sel.order.push((name, e));
100102
}
101103

102104
sel.order.shuffle(&mut rnd);
103105

104-
cmd.spawn((SelectTimer, Timer::from_seconds(SHOWCASE_TIMER_SECS, true)));
106+
commands.spawn((SelectTimer, Timer::from_seconds(SHOWCASE_TIMER_SECS, true)));
105107

106-
cmd.spawn((ContributorDisplay,))
108+
commands
109+
.spawn((ContributorDisplay,))
107110
.with_bundle(TextComponents {
108111
style: Style {
109112
align_self: AlignSelf::FlexEnd,
@@ -120,7 +123,7 @@ fn setup(
120123
..Default::default()
121124
});
122125

123-
cmd.insert_resource(sel);
126+
commands.insert_resource(sel);
124127
}
125128

126129
/// Finds the next contributor to display and selects the entity

0 commit comments

Comments
 (0)