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

@ -35,10 +35,10 @@ pub fn (mut x Cbc) free() {
// internal
fn new_des_cbc(b Block, iv []u8) Cbc {
return Cbc{
b: b
b: b
block_size: b.block_size
iv: iv.clone()
tmp: []u8{len: b.block_size}
iv: iv.clone()
tmp: []u8{len: b.block_size}
}
}

View file

@ -53,11 +53,11 @@ fn new_cfb(b Block, iv []u8, decrypt bool) Cfb {
panic('cipher.new_cfb: IV length must be equal block size')
}
mut x := Cfb{
b: b
out: []u8{len: b.block_size}
next: []u8{len: b.block_size}
b: b
out: []u8{len: b.block_size}
next: []u8{len: b.block_size}
out_used: block_size
decrypt: decrypt
decrypt: decrypt
}
copy(mut x.next, iv)
return x

View file

@ -42,9 +42,9 @@ pub fn new_ctr(b Block, iv []u8) Ctr {
panic('cipher.new_cfb: IV length must be equal block size')
}
return Ctr{
b: b
out: []u8{len: b.block_size}
next: iv.clone()
b: b
out: []u8{len: b.block_size}
next: iv.clone()
out_used: block_size
}
}

View file

@ -26,9 +26,9 @@ pub fn new_ofb(b Block, iv []u8) Ofb {
panic('cipher.new_ofb: IV length must be equal block size')
}
mut x := Ofb{
b: b
out: []u8{len: b.block_size}
next: []u8{len: b.block_size}
b: b
out: []u8{len: b.block_size}
next: []u8{len: b.block_size}
out_used: block_size
}
copy(mut x.next, iv)