revert #23436; remove workaround (#23653)

revert #23436
This commit is contained in:
ringabout
2024-05-28 20:40:41 +08:00
committed by GitHub
parent cc5ce72376
commit d923c581c1

View File

@@ -80,8 +80,6 @@ proc `[]`*[T, U: Ordinal](s: string, x: HSlice[T, U]): string {.inline, systemRa
## var s = "abcdef"
## assert s[1..3] == "bcd"
## ```
# Workaround bug #22852
result = ""
let a = s ^^ x.a
let L = (s ^^ x.b) - a + 1
result = newString(L)