Skip to content

Commit 8dc3c72

Browse files
committed
Use new default shorthand
1 parent 630d9c5 commit 8dc3c72

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/2d/shapes.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ fn setup(
1919
sprite: Sprite {
2020
color: Color::rgb(0.25, 0.25, 0.75),
2121
custom_size: Some(Vec2::new(50.0, 100.0)),
22-
..Default::default()
22+
..default()
2323
},
24-
..Default::default()
24+
..default()
2525
});
2626

2727
// Circle
@@ -30,7 +30,7 @@ fn setup(
3030
material: materials.add(ColorMaterial::from(Color::PURPLE)),
3131
transform: Transform::from_translation(Vec3::new(-100., 0., 0.))
3232
.with_scale(Vec2::splat(100.0).extend(1.)),
33-
..Default::default()
33+
..default()
3434
});
3535

3636
// Hexagon
@@ -39,14 +39,14 @@ fn setup(
3939
.add(
4040
shape::RegularPolygon {
4141
sides: 6,
42-
..Default::default()
42+
..default()
4343
}
4444
.into(),
4545
)
4646
.into(),
4747
material: materials.add(ColorMaterial::from(Color::TURQUOISE)),
4848
transform: Transform::from_translation(Vec3::new(100., 0., 0.))
4949
.with_scale(Vec2::splat(100.0).extend(1.)),
50-
..Default::default()
50+
..default()
5151
});
5252
}

0 commit comments

Comments
 (0)