mirror of
https://github.com/vlang/v.git
synced 2025-09-11 16:36:20 -04:00
fmt: remove additional line breaks after call_expr before params struct args (#19795)
This commit is contained in:
parent
cd5c5561db
commit
22e17c3e8f
@ -1976,11 +1976,12 @@ fn (mut f Fmt) write_generic_call_if_require(node ast.CallExpr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn (mut f Fmt) call_args(args []ast.CallArg) {
|
pub fn (mut f Fmt) call_args(args []ast.CallArg) {
|
||||||
f.single_line_fields = true
|
old_single_line_fields_state := f.single_line_fields
|
||||||
old_short_arg_state := f.use_short_fn_args
|
old_short_arg_state := f.use_short_fn_args
|
||||||
|
f.single_line_fields = true
|
||||||
f.use_short_fn_args = false
|
f.use_short_fn_args = false
|
||||||
defer {
|
defer {
|
||||||
f.single_line_fields = false
|
f.single_line_fields = old_single_line_fields_state
|
||||||
f.use_short_fn_args = old_short_arg_state
|
f.use_short_fn_args = old_short_arg_state
|
||||||
}
|
}
|
||||||
for i, arg in args {
|
for i, arg in args {
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
[params]
|
||||||
|
struct Bar {
|
||||||
|
bar bool
|
||||||
|
}
|
||||||
|
|
||||||
|
fn foo(msg string, opts Bar) {
|
||||||
|
println(msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
foo(123.str(), bar: true)
|
Loading…
x
Reference in New Issue
Block a user