Avoid naming variables str
This renames variables named `str` to other names, to make sure `str` always refers to a type. It's confusing to read code where `str` (or another standard type name) is used as an identifier. It also produces misleading syntax highlighting.
This commit is contained in:
@@ -204,8 +204,8 @@ impl Wtf8Buf {
|
||||
///
|
||||
/// Since WTF-8 is a superset of UTF-8, this always succeeds.
|
||||
#[inline]
|
||||
pub fn from_str(str: &str) -> Wtf8Buf {
|
||||
Wtf8Buf { bytes: <[_]>::to_vec(str.as_bytes()), is_known_utf8: true }
|
||||
pub fn from_str(s: &str) -> Wtf8Buf {
|
||||
Wtf8Buf { bytes: <[_]>::to_vec(s.as_bytes()), is_known_utf8: true }
|
||||
}
|
||||
|
||||
pub fn clear(&mut self) {
|
||||
|
||||
Reference in New Issue
Block a user