3 ms·
Rust doesn't have two string types. They have one string literal type (str&) and a poorly named string buffer (String).
by imtringued 9y ago
Rust doesn't have two string types. They have one string literal type (str&) and a poorly named string buffer (String).
- cesarb 9y agoActually, Rust has four string types: str/String, CStr/CString, OsStr/OsString, and Path/PathBuf.
- steveklabnik 9y agoOnly str is in the language. The others are standard library types. Libraries may introduce more types too. We almost made str a library type but the downsides outweighed the upsides.