mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-09-27 04:19:22 +00:00
refactor some small session fields
Some checks are pending
lint / cargo-check (push) Waiting to run
lint / clippy (push) Waiting to run
lint / pre-commit (push) Waiting to run
lint / rustfmt (push) Waiting to run
release / build (push) Waiting to run
release / test (push) Waiting to run
release / release (push) Blocked by required conditions
test / generate-matrix (push) Waiting to run
test / Python , Django () (push) Blocked by required conditions
test / tests (push) Blocked by required conditions
zizmor 🌈 / zizmor latest via PyPI (push) Waiting to run
Some checks are pending
lint / cargo-check (push) Waiting to run
lint / clippy (push) Waiting to run
lint / pre-commit (push) Waiting to run
lint / rustfmt (push) Waiting to run
release / build (push) Waiting to run
release / test (push) Waiting to run
release / release (push) Blocked by required conditions
test / generate-matrix (push) Waiting to run
test / Python , Django () (push) Blocked by required conditions
test / tests (push) Blocked by required conditions
zizmor 🌈 / zizmor latest via PyPI (push) Waiting to run
This commit is contained in:
parent
9e13422245
commit
de5e65c10d
2 changed files with 13 additions and 8 deletions
|
@ -45,8 +45,8 @@ pub struct Session {
|
|||
}
|
||||
|
||||
impl Session {
|
||||
pub fn client_capabilities_mut(&mut self) -> &mut Option<ClientCapabilities> {
|
||||
&mut self.client_capabilities
|
||||
pub fn set_client_capabilities(&mut self, client_capabilities: ClientCapabilities) {
|
||||
self.client_capabilities = Some(client_capabilities);
|
||||
}
|
||||
|
||||
pub fn project(&self) -> Option<&DjangoProject> {
|
||||
|
@ -56,6 +56,9 @@ impl Session {
|
|||
pub fn project_mut(&mut self) -> &mut Option<DjangoProject> {
|
||||
&mut self.project
|
||||
}
|
||||
pub fn set_project(&mut self, project: DjangoProject) {
|
||||
self.project = Some(project);
|
||||
}
|
||||
|
||||
pub fn documents(&self) -> &Store {
|
||||
&self.documents
|
||||
|
@ -69,8 +72,8 @@ impl Session {
|
|||
&self.settings
|
||||
}
|
||||
|
||||
pub fn settings_mut(&mut self) -> &mut Settings {
|
||||
&mut self.settings
|
||||
pub fn set_settings(&mut self, settings: Settings) {
|
||||
self.settings = settings;
|
||||
}
|
||||
|
||||
/// Get a database instance directly from the session
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue