Bug #1: If you know you're working with strings at any level, there are almost no reasons for not using `std::string`. `atoi` is an historic C function so it expects a C style string. String has a perfectly fine `.data` accessor just like vector. However it is safer as by the C++11 standard it is guaranteed to be null terminated. Not to mention the allocation scheme that vectors follow compared to strings.
Bug #2: While the docs could be better at showing cases of undefined behavior it does mention it in the second sentence. And while using undefined behavior can be ok at times; blaming the language when it breaks is not right. C and C++ give absolutely 0 shits about what you do as long as it doesn't violate its syntax or its defined interfaces.
All in all while Rust is a good step in the right direction you're still gonna have to RTFM. There are plenty of pitfalls in Rust as well even though undefined behavior is not allowed.