fmt: fix formating a file in an oscillating manner (fix #22223, fix #22026) (#22232)

This commit is contained in:
yuyi 2024-09-17 14:47:38 +08:00 committed by GitHub
parent c004d0c899
commit acf6b344f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
99 changed files with 681 additions and 655 deletions

View file

@ -46,4 +46,4 @@ fn main() {
println('JSON encoding of employee y: ${ss}')
assert ss == s
}
```
```

View file

@ -15,8 +15,8 @@ fn test_json_encode_with_ptr() {
name: 'foo'
}
data := MyStruct{
user: &user
users: {
user: &user
users: {
'keyfoo': user
}
users2: {

View file

@ -273,7 +273,7 @@ fn test_nested_type() {
cities: [City{'Donlon'}, City{'Termanches'}]
},
]
users: {
users: {
'Foo': User{
age: 10
nums: [1, 2, 3]
@ -291,7 +291,7 @@ fn test_nested_type() {
pets: 'little boo'
}
}
extra: {
extra: {
'2': {
'n1': 2
'n2': 4
@ -527,7 +527,7 @@ fn test_encoding_struct_with_pointers() {
association: &Association{
price: APrice{}
}
price: APrice{}
price: APrice{}
}
assert json.encode(value) == '{"association":{"price":{}},"price":{}}'
}