From 60609c34bd17a5049619aecc2d7e4affd0776513 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 5 Dec 2024 10:58:18 -0600 Subject: [PATCH] rename field --- crates/djls/src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/djls/src/main.rs b/crates/djls/src/main.rs index b391712..b581f1a 100644 --- a/crates/djls/src/main.rs +++ b/crates/djls/src/main.rs @@ -8,7 +8,7 @@ use djls_pyenv::PythonEnvironment; #[derive(Debug)] struct Backend { client: Client, - python_env: PythonEnvironment, + python: PythonEnvironment, } #[tower_lsp::async_trait] @@ -35,7 +35,7 @@ impl LanguageServer for Backend { .await; self.client - .log_message(MessageType::INFO, format!("\n{}", self.python_env)) + .log_message(MessageType::INFO, format!("\n{}", self.python)) .await; } @@ -46,12 +46,12 @@ impl LanguageServer for Backend { #[tokio::main] async fn main() -> Result<()> { - let python_env = PythonEnvironment::initialize()?; + let python = PythonEnvironment::initialize()?; let stdin = tokio::io::stdin(); let stdout = tokio::io::stdout(); - let (service, socket) = LspService::build(|client| Backend { client, python_env }).finish(); + let (service, socket) = LspService::build(|client| Backend { client, python }).finish(); Server::new(stdin, stdout, socket).serve(service).await;