logoalt Hacker News

Cyph0nyesterday at 2:10 AM1 replyview on HN

Gotcha. There is a split_at_mut method that splits a mutable slice reference into two. That doesn’t address the problem you had, but I think that’s best you can do with safe Rust.


Replies

loegyesterday at 3:04 AM

Yeah. It just isn't something the borrow checker natively understands.