From 48454c004700e359c3c496871643913fb20de84f Mon Sep 17 00:00:00 2001 From: Chris Copeland Date: Wed, 20 Jul 2022 01:24:27 -0700 Subject: Replace `map().unwrap_or()` with `map_or()` Use a `map_or` instead of a `map().unwrap_or()` chain. --- alacritty_terminal/src/tty/unix.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'alacritty_terminal/src/tty/unix.rs') 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 // 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)); -- cgit