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

:(


All of Rust's safe abstractions are on top of unsafe. It isn't a bad thing, it just need to be used with rigor.

Splitting a single slice into two mutable slices is done via https://doc.rust-lang.org/std/primitive.slice.html#method.sp... if you want more than that, you will need to roll your own.

I think it would be a great exercise to implement what you are asking for, the docs link directly to the source.

https://doc.rust-lang.org/src/core/slice/mod.rs.html#991-100...




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

Search: