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:
@@ -29,7 +29,7 @@ pub mut:
|
||||
// new_benchmark returns a `Benchmark` instance on the stack.
|
||||
pub fn new_benchmark() Benchmark {
|
||||
return Benchmark{
|
||||
bench_timer: time.new_stopwatch({})
|
||||
bench_timer: time.new_stopwatch()
|
||||
verbose: true
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,7 @@ pub fn new_benchmark() Benchmark {
|
||||
// new_benchmark_no_cstep returns a new `Benchmark` instance with step counting disabled.
|
||||
pub fn new_benchmark_no_cstep() Benchmark {
|
||||
return Benchmark{
|
||||
bench_timer: time.new_stopwatch({})
|
||||
bench_timer: time.new_stopwatch()
|
||||
verbose: true
|
||||
no_cstep: true
|
||||
}
|
||||
@@ -47,7 +47,7 @@ pub fn new_benchmark_no_cstep() Benchmark {
|
||||
// This is useful for long-lived use of `Benchmark` instances.
|
||||
pub fn new_benchmark_pointer() &Benchmark {
|
||||
return &Benchmark{
|
||||
bench_timer: time.new_stopwatch({})
|
||||
bench_timer: time.new_stopwatch()
|
||||
verbose: true
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user