It is safe btw. The difference is that it returns two mutable references vs. one shared ref and one mutable ref. But as they noted, a mutable ref can always be “downgraded” into a shared ref.
> split_at_mut is just unsafe code (and sibling comment mentioned it hours before you did). The borrow checker doesn't natively understand that.
Is creating a TCP socket using stdlib functions unsafe? How about writing to a file? Or acquiring a mutex?
I would suggest doing some more reading before chiming in here :)
Easier to lose context with longer comment chains...