From bcf70d8e67ff0473e3723ec4f7bb33305e824407 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Fri, 3 Dec 2021 13:29:46 +0900 Subject: dap: All of these calls don't need &mut --- helix-dap/src/client.rs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'helix-dap') diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs index 61c05a0b..7c18ec53 100644 --- a/helix-dap/src/client.rs +++ b/helix-dap/src/client.rs @@ -284,7 +284,7 @@ impl Client { Ok(()) } - pub async fn disconnect(&mut self) -> Result<()> { + pub async fn disconnect(&self) -> Result<()> { self.request::(()).await } @@ -297,7 +297,7 @@ impl Client { } pub async fn set_breakpoints( - &mut self, + &self, file: PathBuf, breakpoints: Vec, ) -> Result>> { @@ -321,11 +321,11 @@ impl Client { Ok(response.breakpoints) } - pub async fn configuration_done(&mut self) -> Result<()> { + pub async fn configuration_done(&self) -> Result<()> { self.request::(()).await } - pub async fn continue_thread(&mut self, thread_id: ThreadId) -> Result> { + pub async fn continue_thread(&self, thread_id: ThreadId) -> Result> { let args = requests::ContinueArguments { thread_id }; let response = self.request::(args).await?; @@ -333,7 +333,7 @@ impl Client { } pub async fn stack_trace( - &mut self, + &self, thread_id: ThreadId, ) -> Result<(Vec, Option)> { let args = requests::StackTraceArguments { @@ -347,19 +347,19 @@ impl Client { Ok((response.stack_frames, response.total_frames)) } - pub async fn threads(&mut self) -> Result> { + pub async fn threads(&self) -> Result> { let response = self.request::(()).await?; Ok(response.threads) } - pub async fn scopes(&mut self, frame_id: usize) -> Result> { + pub async fn scopes(&self, frame_id: usize) -> Result> { let args = requests::ScopesArguments { frame_id }; let response = self.request::(args).await?; Ok(response.scopes) } - pub async fn variables(&mut self, variables_reference: usize) -> Result> { + pub async fn variables(&self, variables_reference: usize) -> Result> { let args = requests::VariablesArguments { variables_reference, filter: None, @@ -372,7 +372,7 @@ impl Client { Ok(response.variables) } - pub async fn step_in(&mut self, thread_id: ThreadId) -> Result<()> { + pub async fn step_in(&self, thread_id: ThreadId) -> Result<()> { let args = requests::StepInArguments { thread_id, target_id: None, @@ -382,7 +382,7 @@ impl Client { self.request::(args).await } - pub async fn step_out(&mut self, thread_id: ThreadId) -> Result<()> { + pub async fn step_out(&self, thread_id: ThreadId) -> Result<()> { let args = requests::StepOutArguments { thread_id, granularity: None, @@ -391,7 +391,7 @@ impl Client { self.request::(args).await } - pub async fn next(&mut self, thread_id: ThreadId) -> Result<()> { + pub async fn next(&self, thread_id: ThreadId) -> Result<()> { let args = requests::NextArguments { thread_id, granularity: None, @@ -400,14 +400,14 @@ impl Client { self.request::(args).await } - pub async fn pause(&mut self, thread_id: ThreadId) -> Result<()> { + pub async fn pause(&self, thread_id: ThreadId) -> Result<()> { let args = requests::PauseArguments { thread_id }; self.request::(args).await } pub async fn eval( - &mut self, + &self, expression: String, frame_id: Option, ) -> Result { @@ -422,7 +422,7 @@ impl Client { } pub async fn set_exception_breakpoints( - &mut self, + &self, filters: Vec, ) -> Result>> { let args = requests::SetExceptionBreakpointsArguments { filters }; -- cgit v1.2.3-70-g09d2