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

@ -127,7 +127,7 @@ pub fn (mut ws Client) read_next_message() !Message {
// Control frames can interject other frames
// and need to be returned immediately
msg := Message{
opcode: OPCode(frame.opcode)
opcode: OPCode(frame.opcode)
payload: frame_payload.clone()
}
unsafe { frame_payload.free() }
@ -137,7 +137,7 @@ pub fn (mut ws Client) read_next_message() !Message {
// a fragment is allowed to have zero size payload
if !frame.fin {
ws.fragments << &Fragment{
data: frame_payload.clone()
data: frame_payload.clone()
opcode: frame.opcode
}
unsafe { frame_payload.free() }
@ -150,7 +150,7 @@ pub fn (mut ws Client) read_next_message() !Message {
return err
}
msg := Message{
opcode: OPCode(frame.opcode)
opcode: OPCode(frame.opcode)
payload: frame_payload.clone()
}
unsafe { frame_payload.free() }
@ -167,7 +167,7 @@ pub fn (mut ws Client) read_next_message() !Message {
opcode := ws.opcode_from_fragments()
ws.validate_utf_8(opcode, payload)!
msg := Message{
opcode: opcode
opcode: opcode
payload: payload.clone()
}
unsafe {