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

@ -24,8 +24,8 @@ pub fn (bp byteptr) vstring() string {
@[unsafe]
pub fn (bp byteptr) vstring_with_len(len int) string {
return string{
str: bp
len: len
str: bp
len: len
is_lit: 0
}
}
@ -35,8 +35,8 @@ pub fn (bp byteptr) vstring_with_len(len int) string {
@[unsafe]
pub fn (cp charptr) vstring() string {
return string{
str: byteptr(cp)
len: unsafe { vstrlen_char(cp) }
str: byteptr(cp)
len: unsafe { vstrlen_char(cp) }
is_lit: 0
}
}
@ -46,8 +46,8 @@ pub fn (cp charptr) vstring() string {
@[unsafe]
pub fn (cp charptr) vstring_with_len(len int) string {
return string{
str: byteptr(cp)
len: len
str: byteptr(cp)
len: len
is_lit: 0
}
}
@ -62,8 +62,8 @@ pub fn (cp charptr) vstring_with_len(len int) string {
@[unsafe]
pub fn (bp byteptr) vstring_literal() string {
return string{
str: bp
len: unsafe { vstrlen(bp) }
str: bp
len: unsafe { vstrlen(bp) }
is_lit: 1
}
}
@ -73,8 +73,8 @@ pub fn (bp byteptr) vstring_literal() string {
@[unsafe]
pub fn (bp byteptr) vstring_literal_with_len(len int) string {
return string{
str: bp
len: len
str: bp
len: len
is_lit: 1
}
}
@ -85,8 +85,8 @@ pub fn (bp byteptr) vstring_literal_with_len(len int) string {
@[unsafe]
pub fn (cp charptr) vstring_literal() string {
return string{
str: byteptr(cp)
len: unsafe { vstrlen_char(cp) }
str: byteptr(cp)
len: unsafe { vstrlen_char(cp) }
is_lit: 1
}
}
@ -97,8 +97,8 @@ pub fn (cp charptr) vstring_literal() string {
@[unsafe]
pub fn (cp charptr) vstring_literal_with_len(len int) string {
return string{
str: byteptr(cp)
len: len
str: byteptr(cp)
len: len
is_lit: 1
}
}