Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is great, thorough, and taught me a lot about Rust and not just it's Strings.

One nit is to explain what the hell the lightning bolts mean in your code samples. I interpreted it as the assertions failed and got really mixed up when reading half way down the page.

Actually, I'm still confused, and on mobile. > The potentially surprising thing here is that the resulting string is "WÖRLD", instead of "WöRLD". > ... > Since we cannot change which memory location the slice spans, ..., we can generally not perform this operation.

These seem to conflict. Maybe a typo. Maybe it's me. Maybe it's maybelline.





Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: