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

vfmt: change all '$expr' to '${expr}' (#16428)

This commit is contained in:
yuyi
2022-11-15 21:53:13 +08:00
committed by GitHub
parent 56239b4a23
commit 017ace6ea7
859 changed files with 7156 additions and 7135 deletions

View File

@@ -189,10 +189,10 @@ fn validate_string(characters string, radix u32) ! {
value := big.digit_array.index(digit)
if value == -1 {
return error('Invalid character $digit')
return error('Invalid character ${digit}')
}
if value >= radix {
return error('Invalid character $digit for base $radix')
return error('Invalid character ${digit} for base ${radix}')
}
}
}

View File

@@ -11,7 +11,7 @@ fn timed_println(msg string) {
}
fn timed_println_extended(t time.StopWatch, msg string) {
println('${t.elapsed().microseconds():12} | $msg')
println('${t.elapsed().microseconds():12} | ${msg}')
}
fn f(x big.Integer, y int) big.Integer {
@@ -40,7 +40,7 @@ fn calculate_and_measure(calc_label string, cb fn () big.Integer) string {
sw := time.new_stopwatch()
timed_println_extended(sw, 'start')
a := cb()
timed_println_extended(sw, 'done $calc_label')
timed_println_extended(sw, 'done ${calc_label}')
timed_println_extended(sw, 'a.bit_len(): ${a.bit_len():12}')
timed_println_extended(sw, 'before a.str()')