This commit is contained in:
jimmyfraiture
2025-09-22 13:49:11 +01:00
parent 3b526789b7
commit aa8b4bed98
3 changed files with 4 additions and 4 deletions

View File

@@ -562,10 +562,10 @@ mod tests_windows {
for (shell, input, expected_cmd) in cases {
let actual_cmd = shell
.format_default_shell_invocation(input.iter().map(|s| s.to_string()).collect());
.format_default_shell_invocation(input.iter().map(std::string::ToString::to_string).collect());
assert_eq!(
actual_cmd,
Some(expected_cmd.iter().map(|s| s.to_string()).collect())
Some(expected_cmd.iter().map(std::string::ToString::to_string).collect())
);
}
}

View File

@@ -56,7 +56,7 @@ pub(crate) fn apply_sandbox_policy_to_current_thread(
///
/// # Errors
/// Returns [`CodexErr::Sandbox`] variants when the ruleset fails to apply.
fn install_filesystem_landlock_rules_on_current_thread(writable_roots: Vec<PathBuf>) -> Result<()> {
fn install_filesystem_landlock_rules_on_current_thread(writable_roots: &[PathBuf]) -> Result<()> {
let abi = ABI::V5;
let access_rw = AccessFs::from_all(abi);
let access_ro = AccessFs::from_read(abi);

View File

@@ -138,7 +138,7 @@ async fn assert_network_blocked(cmd: &[&str]) {
let cwd = std::env::current_dir().expect("cwd should exist");
let sandbox_cwd = cwd.clone();
let params = ExecParams {
command: cmd.iter().map(|s| s.to_string()).collect(),
command: cmd.iter().map(std::string::ToString::to_string).collect(),
cwd,
// Give the tool a generous 2-second timeout so even slow DNS timeouts
// do not stall the suite.