Skip to content

Commit fe2db64

Browse files
authored
tests: add unsafe block for the int->enum cast in bench_compare_tokens.v (#16438)
1 parent 5dc5766 commit fe2db64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vlib/v/tests/bench/bench_compare_tokens.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn main() {
1515
bmark.measure('${max_repetitions} repetitions of token.keywords["${kw}"] = ${res}')
1616

1717
for _ in 0 .. max_repetitions {
18-
res = token.Kind(km_trie.find(kw))
18+
res = unsafe { token.Kind(km_trie.find(kw)) }
1919
}
2020
bmark.measure('${max_repetitions} repetitions of km_trie.find("${kw}") = ${res}')
2121

0 commit comments

Comments
 (0)