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:
@@ -1283,13 +1283,13 @@ impl fmt::Debug for Output {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
let stdout_utf8 = str::from_utf8(&self.stdout);
|
||||
let stdout_debug: &dyn fmt::Debug = match stdout_utf8 {
|
||||
Ok(ref str) => str,
|
||||
Ok(ref s) => s,
|
||||
Err(_) => &self.stdout,
|
||||
};
|
||||
|
||||
let stderr_utf8 = str::from_utf8(&self.stderr);
|
||||
let stderr_debug: &dyn fmt::Debug = match stderr_utf8 {
|
||||
Ok(ref str) => str,
|
||||
Ok(ref s) => s,
|
||||
Err(_) => &self.stderr,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user