Ruan
ad8cfbeb73
Fix slice.simple_equal misbehaviour on empty slice with non-nil data
Before this change, the following code:
```odin
package strconcat
import "core:fmt"
import "core:slice"
main :: proc() {
a: [1]u8
s1: []u8 = {}
s2: []u8 = a[:0]
fmt.printfln("s1={} len(s1)={} raw_data(s1)={}", s1, len(s1), raw_data(s1))
fmt.printfln("s2={} len(s2)={} raw_data(s2)={}", s2, len(s2), raw_data(s2))
fmt.printfln("equal(s1, s2): {}", slice.equal(s1, s2))
fmt.printfln("simple_equal(s1, s2): {}", slice.simple_equal(s1, s2))
}
```
Produced the following output on my machine:
```
s1=[] len(s1)=0 raw_data(s1)=<nil>
s2=[] len(s2)=0 raw_data(s2)=0x7FFFED64F74F
equal(s1, s2): true
simple_equal(s1, s2): false
```
This commit fixes simple_equal's behaviour to match that of equal.
2026-08-17 22:38:40 +02:00
..
2026-03-22 07:37:18 -07:00
2026-08-08 11:05:20 -03:00
2026-04-28 19:27:24 +02:00
2026-07-31 21:47:02 -04:00
2026-07-10 21:37:47 +02:00
2026-08-05 18:26:44 +09:00
2026-08-03 10:09:39 -04:00
2026-04-28 19:27:24 +02:00
2026-08-16 19:48:19 +12:00
2026-08-02 03:15:30 +02:00
2026-06-19 09:20:26 +01:00
2026-02-17 18:56:39 +01:00
2026-02-09 15:50:21 +01:00
2026-05-16 14:07:41 -04:00
2026-07-15 17:32:16 +02:00
2026-08-14 13:21:03 +02:00
2026-08-17 00:21:50 +03:00
2026-07-21 11:58:48 +03:00
2026-08-05 23:58:33 +02:00
2026-08-09 19:49:08 +02:00
2026-08-16 18:08:17 +02:00
2026-04-28 19:27:24 +02:00
2026-02-09 15:50:21 +01:00
2026-03-14 16:21:38 +00:00
2025-10-09 23:05:29 +02:00
2026-07-30 15:05:16 -04:00
2026-08-16 12:17:39 +02:00
2026-08-17 22:38:40 +02:00
2026-02-09 20:08:22 +01:00
2026-05-25 16:21:00 +01:00
2026-07-14 13:20:45 +02:00
2026-07-15 22:46:07 +02:00
2026-08-09 16:49:37 +02:00
2026-07-30 12:03:08 +02:00
2026-07-30 11:46:06 +02:00
2026-08-10 12:27:31 +02:00
2026-08-07 15:09:08 +02:00
2026-07-06 01:50:23 -03:00
2026-08-10 12:27:31 +02:00