From c1d3c3f9268bfbdf94e180ce0b032f76cd3c64b8 Mon Sep 17 00:00:00 2001 From: Tetralux Date: Thu, 5 Nov 2020 00:51:50 +0000 Subject: [PATCH] Fix slice.last() There was a typo that prevented it from being used. --- 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 764eb6334..3076fe641 100644 --- a/core/slice/slice.odin +++ b/core/slice/slice.odin @@ -216,7 +216,7 @@ split_last :: proc(array: $T/[]$E) -> (rest: T, last: E) { first :: proc(array: $T/[]$E) -> E { return array[0]; } -last :: proc(array: $T/[]$E) -> ^E { +last :: proc(array: $T/[]$E) -> E { return array[len(array)-1]; }