summaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/tty
diff options
context:
space:
mode:
authorChris Copeland <chris@chrisnc.net>2022-07-20 01:24:27 -0700
committerGitHub <noreply@github.com>2022-07-20 11:24:27 +0300
commit48454c004700e359c3c496871643913fb20de84f (patch)
tree754d68e806486a02ac8ce088e87e7c7105832e4a /alacritty_terminal/src/tty
parent2a676dfad837d1784ed0911d314bc263804ef4ef (diff)
downloadalacritty-48454c004700e359c3c496871643913fb20de84f.tar.gz
alacritty-48454c004700e359c3c496871643913fb20de84f.zip
Replace `map().unwrap_or()` with `map_or()`
Use a `map_or` instead of a `map().unwrap_or()` chain.
Diffstat (limited to 'alacritty_terminal/src/tty')
-rw-r--r--alacritty_terminal/src/tty/unix.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/alacritty_terminal/src/tty/unix.rs b/alacritty_terminal/src/tty/unix.rs
index 2bb5e973..d1e5bdb5 100644
--- a/alacritty_terminal/src/tty/unix.rs
+++ b/alacritty_terminal/src/tty/unix.rs
@@ -173,7 +173,7 @@ pub fn new(config: &PtyConfig, window_size: WindowSize, window_id: Option<usize>
// Set $SHELL environment variable on macOS, since login does not do it for us.
#[cfg(target_os = "macos")]
- builder.env("SHELL", config.shell.as_ref().map(|sh| sh.program()).unwrap_or(pw.shell));
+ builder.env("SHELL", config.shell.as_ref().map_or(pw.shell, Program::program));
if let Some(window_id) = window_id {
builder.env("WINDOWID", format!("{}", window_id));