« * K @jamesmunns.com

James Munns @jamesmunns.com

2026-11-22 13:49 UTC

I probably knew this at some point, but I was surprised today to re-learn that `a[a.len()..]` is allowed in Rust, and returns `[]`. `a[a.len()+1..]` always panics. `a[a.len()]` also always panics. It makes sense, design/consistency wise, but huh.

13 likes, 0 reposts, 1 replies

3 Next post4 More from @jamesmunns.comBackBluesky home
☆ Save to home · 0 Home · Find · Games · Chat · AI · Setup