One less unwrap (#12448)

Fixes
https://zed-industries.slack.com/archives/C04S6T1T7TQ/p1717011343884699

Release Notes:

- N/A
This commit is contained in:
Kirill Bulatov 2024-05-29 23:44:56 +03:00 committed by GitHub
parent 5bcb9ed017
commit 0f927fa6fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -89,8 +89,10 @@ impl Project {
path, path,
}); });
let is_terminal = spawn_task.is_none() && (working_directory.as_ref().is_none()) let is_terminal = spawn_task.is_none()
|| (working_directory.as_ref().unwrap().is_local()); && working_directory
.as_ref()
.map_or(true, |work_dir| work_dir.is_local());
let settings = TerminalSettings::get(settings_location, cx); let settings = TerminalSettings::get(settings_location, cx);
let python_settings = settings.detect_venv.clone(); let python_settings = settings.detect_venv.clone();
let (completion_tx, completion_rx) = bounded(1); let (completion_tx, completion_rx) = bounded(1);