Skip to content

Commit d55ca65

Browse files
inline chained expressions
1 parent ccf3329 commit d55ca65

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/djls-project/src/python.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ use std::path::{Path, PathBuf};
66

77
#[salsa::tracked]
88
pub fn find_python_environment(db: &dyn Db) -> Option<PythonEnvironment> {
9-
let project_path = db.metadata().root();
10-
let venv_path = db.metadata().venv();
9+
let project_path = db.metadata().root().as_path();
10+
let venv_path = db.metadata().venv().and_then(|p| p.to_str());
1111

12-
PythonEnvironment::new(project_path.as_path(), venv_path.and_then(|p| p.to_str()))
12+
PythonEnvironment::new(project_path, venv_path)
1313
}
1414

1515
#[derive(Clone, Debug, PartialEq)]

0 commit comments

Comments
 (0)