This seemed small enough to not be worth an RFC. Please correct me if it’s not.
Similar to how the str::from_bytes function was renamed to str::from_utf8, the &str::as_bytes method should be renamed to something that indicate UTF-8, possibly &str::as_utf8 or &str::as_utf8_bytes.
The &str::bytes and &str::bytes_rev iterators, the ~str::into_bytes method, and the StrBuf equivalent to all of the above should also be renamed accordingly.
This seemed small enough to not be worth an RFC. Please correct me if it’s not.
Similar to how the
str::from_bytesfunction was renamed tostr::from_utf8, the&str::as_bytesmethod should be renamed to something that indicate UTF-8, possibly&str::as_utf8or&str::as_utf8_bytes.The
&str::bytesand&str::bytes_reviterators, the~str::into_bytesmethod, and theStrBufequivalent to all of the above should also be renamed accordingly.