mirror of
https://github.com/vlang/v.git
synced 2025-09-15 07:22:27 +03:00
fmt: fix alignment of struct init fields (#22025)
This commit is contained in:
parent
99da5726db
commit
c51d30bf53
671 changed files with 18817 additions and 18787 deletions
|
@ -47,11 +47,11 @@ pub fn with_cancel(mut parent Context) (Context, CancelFn) {
|
|||
// new_cancel_context returns an initialized CancelContext.
|
||||
fn new_cancel_context(parent Context) &CancelContext {
|
||||
return &CancelContext{
|
||||
id: rand.uuid_v4()
|
||||
id: rand.uuid_v4()
|
||||
context: parent
|
||||
mutex: sync.new_mutex()
|
||||
done: chan int{cap: 2}
|
||||
err: none
|
||||
mutex: sync.new_mutex()
|
||||
done: chan int{cap: 2}
|
||||
err: none
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ pub fn with_deadline(mut parent Context, d time.Time) (Context, CancelFn) {
|
|||
cancel_ctx := new_cancel_context(parent)
|
||||
mut ctx := &TimerContext{
|
||||
cancel_ctx: cancel_ctx
|
||||
deadline: d
|
||||
id: id
|
||||
deadline: d
|
||||
id: id
|
||||
}
|
||||
propagate_cancel(mut parent, mut ctx)
|
||||
dur := d - time.now()
|
||||
|
|
|
@ -24,10 +24,10 @@ pub fn merge(ctx context.Context, ctxs ...context.Context) (context.Context, con
|
|||
mut background := context.background()
|
||||
cancel_ctx, cancel := context.with_cancel(mut &background)
|
||||
mut octx := &OneContext{
|
||||
done: chan int{cap: 3}
|
||||
ctx: ctx
|
||||
ctxs: ctxs
|
||||
cancel_fn: cancel
|
||||
done: chan int{cap: 3}
|
||||
ctx: ctx
|
||||
ctxs: ctxs
|
||||
cancel_fn: cancel
|
||||
cancel_ctx: cancel_ctx
|
||||
}
|
||||
spawn octx.run()
|
||||
|
|
|
@ -28,8 +28,8 @@ mut:
|
|||
pub fn with_value(parent Context, key Key, value Any) Context {
|
||||
return &ValueContext{
|
||||
context: parent
|
||||
key: key
|
||||
value: value
|
||||
key: key
|
||||
value: value
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue