4 ms·
&str is not the same as &[char]. &str has the same memory representation as &[u8]. char is four bytes, not one.
by steveklabnik 8y ago
&str is not the same as &[char]. &str has the same memory representation as &[u8]. char is four bytes, not one.
- gridspy 8y agoThanks Steve.
- steveklabnik 8y agoNo problem! It's an easy mistake to make.