From 2c7b3e6780bbc1bf5079509ee3fe5b59157db2ce Mon Sep 17 00:00:00 2001
From: pav
Date: Mon, 17 Aug 2026 18:40:12 +0200
Subject: [PATCH] fix slice.get doing unnecessary bounds check
---
core/slice/slice.odin | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/slice/slice.odin b/core/slice/slice.odin
index 8485af145..a743cfbc7 100644
--- a/core/slice/slice.odin
+++ b/core/slice/slice.odin
@@ -563,7 +563,7 @@ last_ptr :: proc(array: $T/[]$E) -> ^E {
@(require_results)
get :: proc "contextless" (array: $T/[]$E, index: int) -> (value: E, ok: bool) {
- #bounds_check if uint(index) < len(array) {
+ #no_bounds_check if uint(index) < len(array) {
value = array[index]
ok = true
}