mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
fix scenes-example unread field warning (#2179)
This should fix CI error: https://github.com/bevyengine/bevy/pull/2175/checks?check_run_id=2592736553
This commit is contained in:
parent
73f4a9d18f
commit
e3435e5144
1 changed files with 2 additions and 2 deletions
|
@ -35,14 +35,14 @@ struct ComponentA {
|
||||||
struct ComponentB {
|
struct ComponentB {
|
||||||
pub value: String,
|
pub value: String,
|
||||||
#[reflect(ignore)]
|
#[reflect(ignore)]
|
||||||
pub time_since_startup: Duration,
|
pub _time_since_startup: Duration,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FromWorld for ComponentB {
|
impl FromWorld for ComponentB {
|
||||||
fn from_world(world: &mut World) -> Self {
|
fn from_world(world: &mut World) -> Self {
|
||||||
let time = world.get_resource::<Time>().unwrap();
|
let time = world.get_resource::<Time>().unwrap();
|
||||||
ComponentB {
|
ComponentB {
|
||||||
time_since_startup: time.time_since_startup(),
|
_time_since_startup: time.time_since_startup(),
|
||||||
value: "Default Value".to_string(),
|
value: "Default Value".to_string(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue