Skip to content

Commit

Permalink
Use as_deref() where appropriate.
Browse files Browse the repository at this point in the history
  • Loading branch information
hniksic committed Sep 15, 2020
1 parent 00e5b56 commit a09612a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/popen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -689,12 +689,12 @@ mod os {
set_inheritable(&exec_fail_pipe.1, false)?;
{
let child_ends = self.setup_streams(config.stdin, config.stdout, config.stderr)?;
let child_env = config.env.map(|env| format_env(&env));
let child_env = config.env.as_deref().map(format_env);
let cmd_to_exec = config.executable.as_ref().unwrap_or(&argv[0]);
let just_exec = posix::stage_exec(
cmd_to_exec,
&argv[..],
child_env.as_ref().map(::std::ops::Deref::deref),
child_env.as_deref(),
)?;
unsafe {
// unsafe because after the call to fork() the
Expand Down

0 comments on commit a09612a

Please sign in to comment.