diff options
Diffstat (limited to 'helix-dap/src/client.rs')
-rw-r--r-- | helix-dap/src/client.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs index 62557951..28cc7c90 100644 --- a/helix-dap/src/client.rs +++ b/helix-dap/src/client.rs @@ -1,7 +1,7 @@ use crate::{ transport::{Payload, Request, Transport}, types::*, - Error, Result, + Error, Result, ThreadId, }; use helix_core::syntax::DebuggerQuirks; @@ -30,9 +30,9 @@ pub struct Client { request_counter: AtomicU64, pub caps: Option<DebuggerCapabilities>, // thread_id -> frames - pub stack_frames: HashMap<isize, Vec<StackFrame>>, - pub thread_states: HashMap<isize, String>, - pub thread_id: Option<isize>, + pub stack_frames: HashMap<ThreadId, Vec<StackFrame>>, + pub thread_states: HashMap<ThreadId, String>, + pub thread_id: Option<ThreadId>, /// Currently active frame for the current thread. pub active_frame: Option<usize>, pub breakpoints: Vec<Breakpoint>, @@ -311,7 +311,7 @@ impl Client { self.request::<requests::ConfigurationDone>(()).await } - pub async fn continue_thread(&mut self, thread_id: isize) -> Result<Option<bool>> { + pub async fn continue_thread(&mut self, thread_id: ThreadId) -> Result<Option<bool>> { let args = requests::ContinueArguments { thread_id }; let response = self.request::<requests::Continue>(args).await?; @@ -320,7 +320,7 @@ impl Client { pub async fn stack_trace( &mut self, - thread_id: isize, + thread_id: ThreadId, ) -> Result<(Vec<StackFrame>, Option<usize>)> { let args = requests::StackTraceArguments { thread_id, @@ -358,7 +358,7 @@ impl Client { Ok(response.variables) } - pub async fn step_in(&mut self, thread_id: isize) -> Result<()> { + pub async fn step_in(&mut self, thread_id: ThreadId) -> Result<()> { let args = requests::StepInArguments { thread_id, target_id: None, @@ -368,7 +368,7 @@ impl Client { self.request::<requests::StepIn>(args).await } - pub async fn step_out(&mut self, thread_id: isize) -> Result<()> { + pub async fn step_out(&mut self, thread_id: ThreadId) -> Result<()> { let args = requests::StepOutArguments { thread_id, granularity: None, @@ -377,7 +377,7 @@ impl Client { self.request::<requests::StepOut>(args).await } - pub async fn next(&mut self, thread_id: isize) -> Result<()> { + pub async fn next(&mut self, thread_id: ThreadId) -> Result<()> { let args = requests::NextArguments { thread_id, granularity: None, @@ -386,7 +386,7 @@ impl Client { self.request::<requests::Next>(args).await } - pub async fn pause(&mut self, thread_id: isize) -> Result<()> { + pub async fn pause(&mut self, thread_id: ThreadId) -> Result<()> { let args = requests::PauseArguments { thread_id }; self.request::<requests::Pause>(args).await |