| 1 | struct Bar { |
| 2 | x string |
| 3 | y int |
| 4 | b Baz |
| 5 | } |
| 6 | |
| 7 | struct Baz { |
| 8 | x int |
| 9 | y int |
| 10 | } |
| 11 | |
| 12 | fn main() { |
| 13 | bar_func(x: 'this line is short enough', y: 13) |
| 14 | bar_func( |
| 15 | x: 'a very long content should cause vfmt to use multiple lines instead of one.' |
| 16 | y: 123456789 |
| 17 | ) |
| 18 | bar_func( |
| 19 | x: 'some string' |
| 20 | b: Baz{ |
| 21 | x: 0 |
| 22 | y: 0 |
| 23 | } |
| 24 | ) |
| 25 | bar2_func() |
| 26 | bar2_func(Bar{ x: 's' }, |
| 27 | x: 's' |
| 28 | ) |
| 29 | baz_func('foo', 'bar', |
| 30 | x: 0 |
| 31 | y: 0 |
| 32 | ) |
| 33 | ui.row( |
| 34 | // stretch: true |
| 35 | margin: Margin{ |
| 36 | top: 10 |
| 37 | left: 10 |
| 38 | right: 10 |
| 39 | bottom: 10 |
| 40 | } |
| 41 | ) |
| 42 | } |
| 43 | |
| 44 | fn bar_func(bar Bar) { |
| 45 | } |
| 46 | |
| 47 | fn bar2_func(bar1 Bar, bar2 Bar) { |
| 48 | } |
| 49 | |
| 50 | fn baz_func(a string, b string, baz Baz) {} |
| 51 | |