Skip to content

Commit 324dff8

Browse files
simplify inspector by removing separate pool and consolidating (#270)
1 parent 5eb84a9 commit 324dff8

File tree

10 files changed

+392
-371
lines changed

10 files changed

+392
-371
lines changed

crates/djls-project/src/db.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use std::sync::Arc;
1414

1515
use camino::Utf8PathBuf;
1616

17-
use crate::inspector::pool::InspectorPool;
17+
use crate::inspector::Inspector;
1818
use crate::project::Project;
1919

2020
/// Project-specific database trait extending the workspace database
@@ -23,8 +23,8 @@ pub trait Db: salsa::Database {
2323
/// Get the current project (if set)
2424
fn project(&self) -> Option<Project>;
2525

26-
/// Get the shared inspector pool for executing Python queries
27-
fn inspector_pool(&self) -> Arc<InspectorPool>;
26+
/// Get the shared inspector for executing Python queries
27+
fn inspector(&self) -> Arc<Inspector>;
2828

2929
/// Return the current project root or fall back to the current working directory.
3030
fn project_root_or_cwd(&self) -> Utf8PathBuf {

crates/djls-project/src/django.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub use templatetags::TemplateTags;
55

66
use crate::db::Db as ProjectDb;
77
use crate::inspector::inspector_run;
8-
use crate::inspector::queries::Query;
8+
use crate::inspector::Query;
99
use crate::python::python_environment;
1010
use crate::Project;
1111

crates/djls-project/src/django/templatetags.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use serde_json::Value;
66

77
use crate::db::Db as ProjectDb;
88
use crate::inspector::inspector_run;
9-
use crate::inspector::queries::Query;
9+
use crate::inspector::Query;
1010
use crate::Project;
1111

1212
/// Get template tags for the current project by querying the inspector.

0 commit comments

Comments
 (0)