Reduce allocations (#31223)

Release Notes:

- N/A
This commit is contained in:
tidely 2025-05-23 14:25:17 +03:00 committed by GitHub
parent f435304209
commit fbc922ad46
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 14 additions and 20 deletions

View file

@ -108,14 +108,14 @@ impl Project {
});
}
}
let settings = TerminalSettings::get(settings_location, cx).clone();
let venv = TerminalSettings::get(settings_location, cx)
.detect_venv
.clone();
cx.spawn(async move |project, cx| {
let python_venv_directory = if let Some(path) = path.clone() {
let python_venv_directory = if let Some(path) = path {
project
.update(cx, |this, cx| {
this.python_venv_directory(path, settings.detect_venv.clone(), cx)
})?
.update(cx, |this, cx| this.python_venv_directory(path, venv, cx))?
.await
} else {
None