1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

parser: deprecate short struct init (#10842)

This commit is contained in:
Daniel Däschle
2021-07-20 10:17:08 +02:00
committed by GitHub
parent dc045806f9
commit ad3835b598
85 changed files with 234 additions and 238 deletions

View File

@ -32,7 +32,7 @@ fn main() {
nrec := os.args[2].int()
buflen := os.args[3].int()
nobj := os.args[4].int()
stopwatch := time.new_stopwatch({})
stopwatch := time.new_stopwatch()
ch := chan int{cap: buflen}
resch := chan i64{}
mut no := nobj

View File

@ -36,7 +36,7 @@ mut:
fn do_rec(ch chan int, id int, mut ctx Context) {
eprintln('start of do_rec id: $id')
mut timer_sw_x := time.new_stopwatch({})
mut timer_sw_x := time.new_stopwatch()
mut tmp := int(0)
mut i := int(0)
// NB: a single receiver thread can get slightly more
@ -69,7 +69,7 @@ fn do_rec(ch chan int, id int, mut ctx Context) {
fn do_send(ch chan int, id int, mut ctx Context) {
eprintln('start of do_send id: $id')
mut timer_sw_x := time.new_stopwatch({})
mut timer_sw_x := time.new_stopwatch()
n_iters := ctx.n_iters
base := n_iters * id // sender events can not overlap
for i := 0; i < n_iters; i++ {

View File

@ -86,7 +86,7 @@ fn test_select_blocks() {
a: 13
}
sem.wait()
stopwatch := time.new_stopwatch({})
stopwatch := time.new_stopwatch()
go f1(ch1, ch2, ch3, ch4, ch5, mut sem)
sem.wait()
elapsed_ms := f64(stopwatch.elapsed()) / time.millisecond

View File

@ -648,7 +648,7 @@ pub fn channel_select(mut channels []&Channel, dir []Direction, mut objrefs []vo
stopwatch := if timeout == time.infinite || timeout <= 0 {
time.StopWatch{}
} else {
time.new_stopwatch({})
time.new_stopwatch()
}
mut event_idx := -1 // negative index means `timed out`