Commit bae024a
authored
fix(remote-ssh): disambiguate NUL escapes in the container stat test (#1901)
`cargo clippy --all-targets` denied three `clippy::octal_escapes` on the
`parse_container_file_output` fixture: the literal separated fields with
`\0`, so `\00`, `\01720000000`, and `\0644` read as possible mistaken
octal escapes. `\0` is always NUL in Rust, so the values were already
what the test intended -- clippy just cannot tell that apart from a typo.
Spell the separators `\x00` instead. `\x` consumes exactly two hex
digits, so the following digits can no longer be mistaken for part of the
escape, and the parsed fields are byte-for-byte unchanged.
The lint lives in a `#[cfg(test)]` module, so it only surfaces under
`--all-targets`, which is why the Rust Build Check never flagged it.1 parent 7970806 commit bae024a
1 file changed
Lines changed: 5 additions & 3 deletions
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6034 | 6034 | | |
6035 | 6035 | | |
6036 | 6036 | | |
6037 | | - | |
6038 | | - | |
6039 | | - | |
| 6037 | + | |
| 6038 | + | |
| 6039 | + | |
| 6040 | + | |
| 6041 | + | |
6040 | 6042 | | |
6041 | 6043 | | |
6042 | 6044 | | |
| |||
0 commit comments