From fe2db643843f85b368527712260371d8812fb5f2 Mon Sep 17 00:00:00 2001 From: Basil <100190313+morrig-n@users.noreply.github.com> Date: Tue, 15 Nov 2022 16:34:44 +0000 Subject: [PATCH] tests: add unsafe block for the int->enum cast in bench_compare_tokens.v (#16438) --- vlib/v/tests/bench/bench_compare_tokens.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/tests/bench/bench_compare_tokens.v b/vlib/v/tests/bench/bench_compare_tokens.v index 6209be18cb..9eba691121 100644 --- a/vlib/v/tests/bench/bench_compare_tokens.v +++ b/vlib/v/tests/bench/bench_compare_tokens.v @@ -15,7 +15,7 @@ fn main() { bmark.measure('${max_repetitions} repetitions of token.keywords["${kw}"] = ${res}') for _ in 0 .. max_repetitions { - res = token.Kind(km_trie.find(kw)) + res = unsafe { token.Kind(km_trie.find(kw)) } } bmark.measure('${max_repetitions} repetitions of km_trie.find("${kw}") = ${res}')