https://doc.rust-lang.org/src/alloc/string.rs.html#1215-1230
Using unsafe doesnt necessarily mean you will have undefined behaviour, it just means you have to think really hard about the behaviour because the compiler won't have your back.