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:
Josh Triplett
2025-01-07 14:12:07 +02:00
parent fb546ee09b
commit bb6bbfa13f
10 changed files with 34 additions and 34 deletions

View File

@@ -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,
};