From 9d3b5d37f20f220297b01c871a671da34407e6c2 Mon Sep 17 00:00:00 2001 From: Bob Lee Date: Thu, 30 Jul 2026 04:58:08 -0700 Subject: [PATCH] fix(remote-ssh): disambiguate NUL escapes in the container stat test `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. --- .../services-integrations/src/remote_ssh/manager.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/crates/services/services-integrations/src/remote_ssh/manager.rs b/src/crates/services/services-integrations/src/remote_ssh/manager.rs index 42ad8c90c..91bb4758b 100644 --- a/src/crates/services/services-integrations/src/remote_ssh/manager.rs +++ b/src/crates/services/services-integrations/src/remote_ssh/manager.rs @@ -6034,9 +6034,11 @@ mod tests { #[test] fn container_special_files_are_not_reported_as_regular_files() { - let entry = parse_container_file_output("pipe\0/workspace/pipe\0o\00\01720000000\0644\0") - .unwrap() - .unwrap(); + let entry = parse_container_file_output( + "pipe\x00/workspace/pipe\x00o\x000\x001720000000\x00644\x00", + ) + .unwrap() + .unwrap(); assert!(!entry.is_file); assert!(!entry.is_dir);