fmt: fix alignment of struct init fields (#22025)

This commit is contained in:
yuyi 2024-08-11 14:11:24 +08:00 committed by GitHub
parent 99da5726db
commit c51d30bf53
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
671 changed files with 18817 additions and 18787 deletions

View file

@ -103,14 +103,14 @@ fn main() {
app.ui = objects.get_params()
app.gg = gg.new_context(
width: app.ui.width
height: app.ui.height
width: app.ui.width
height: app.ui.height
window_title: 'Fireworks!'
bg_color: gx.black
user_data: app
frame_fn: on_frame
event_fn: on_event
font_path: font_path
bg_color: gx.black
user_data: app
frame_fn: on_frame
event_fn: on_event
font_path: font_path
)
app.gg.run()

View file

@ -50,7 +50,7 @@ pub fn (mut rocket Rocket) tick(mut ctx gg.Context) {
pub fn new_rocket() Rocket {
return Rocket{
color: random_color()
pos: Vector{
pos: Vector{
x: rand.f32_in_range(50, get_params().width - 50) or { 50 }
}
vel: Vector{
@ -63,7 +63,7 @@ pub fn new_rocket() Rocket {
pub fn (mut rocket Rocket) spawn_particle() {
rocket.particles << Particle{
color: rocket.color
pos: rocket.pos
pos: rocket.pos
accel: random_vector_in_circle().mult(2)
}
}