From 040513c79857c5f55679a1526467db757c670aac Mon Sep 17 00:00:00 2001 From: Marek Kaput Date: Wed, 23 Oct 2024 18:02:32 +0200 Subject: [PATCH] LS: Make `crate::server::schedule::thread` accessible in codebase (#6507) --- crates/cairo-lang-language-server/src/lib.rs | 3 ++- .../src/server/schedule/mod.rs | 11 +++++------ .../src/server/schedule/thread/mod.rs | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/cairo-lang-language-server/src/lib.rs b/crates/cairo-lang-language-server/src/lib.rs index 18816e88e48..dbf9f850f77 100644 --- a/crates/cairo-lang-language-server/src/lib.rs +++ b/crates/cairo-lang-language-server/src/lib.rs @@ -69,7 +69,8 @@ use crate::project::scarb::update_crate_roots; use crate::project::unmanaged_core_crate::try_to_init_unmanaged_core; use crate::server::client::{Client, Notifier, Requester, Responder}; use crate::server::connection::{Connection, ConnectionInitializer}; -use crate::server::schedule::{JoinHandle, Scheduler, Task, event_loop_thread}; +use crate::server::schedule::thread::JoinHandle; +use crate::server::schedule::{Scheduler, Task, event_loop_thread}; use crate::state::State; use crate::toolchain::scarb::ScarbToolchain; diff --git a/crates/cairo-lang-language-server/src/server/schedule/mod.rs b/crates/cairo-lang-language-server/src/server/schedule/mod.rs index 03a8bead43e..8d242ca4bc9 100644 --- a/crates/cairo-lang-language-server/src/server/schedule/mod.rs +++ b/crates/cairo-lang-language-server/src/server/schedule/mod.rs @@ -6,19 +6,18 @@ // +---------------------------------------------------+ use anyhow::Result; -use task::BackgroundTaskBuilder; -use thread::ThreadPriority; +use self::task::BackgroundTaskBuilder; +use self::thread::{JoinHandle, ThreadPriority}; use crate::server::client::{Client, Notifier, Requester, Responder}; use crate::server::connection::ClientSender; use crate::state::State; mod task; -mod thread; +pub mod thread; -pub(super) use task::BackgroundSchedule; -pub use task::{SyncTask, Task}; -pub use thread::JoinHandle; +pub(super) use self::task::BackgroundSchedule; +pub use self::task::{SyncTask, Task}; /// The event loop thread is actually a secondary thread that we spawn from the /// _actual_ main thread. This secondary thread has a larger stack size diff --git a/crates/cairo-lang-language-server/src/server/schedule/thread/mod.rs b/crates/cairo-lang-language-server/src/server/schedule/thread/mod.rs index b4ebb7f27e1..c6644821280 100644 --- a/crates/cairo-lang-language-server/src/server/schedule/thread/mod.rs +++ b/crates/cairo-lang-language-server/src/server/schedule/thread/mod.rs @@ -39,7 +39,7 @@ mod pool; mod priority; pub(super) use pool::Pool; -pub(super) use priority::ThreadPriority; +pub use priority::ThreadPriority; pub struct Builder { priority: ThreadPriority,