on master help sign in
dap: All of these calls don't need &mut
commitbcf70d8e67ff0473e3723ec4f7bb33305e824407 authorBlaž Hrastnik <blaz@mxxn.io> dateFri 3 Dec 2021, 13:29 (5 years ago) parent43fbb6d
1 file changed+14−14
helix-dap/src/client.rs+14−14
helix-dap/src/client.rs+14−14
@@ -284,7 +284,7 @@ impl Client {
284284 Ok(())
285285 }
286286
287− pub async fn disconnect(&mut self) -> Result<()> {
287+ pub async fn disconnect(&self) -> Result<()> {
288288 self.request::<requests::Disconnect>(()).await
289289 }
290290
@@ -297,7 +297,7 @@ impl Client {
297297 }
298298
299299 pub async fn set_breakpoints(
300− &mut self,
300+ &self,
301301 file: PathBuf,
302302 breakpoints: Vec<SourceBreakpoint>,
303303 ) -> Result<Option<Vec<Breakpoint>>> {
@@ -321,11 +321,11 @@ impl Client {
321321 Ok(response.breakpoints)
322322 }
323323
324− pub async fn configuration_done(&mut self) -> Result<()> {
324+ pub async fn configuration_done(&self) -> Result<()> {
325325 self.request::<requests::ConfigurationDone>(()).await
326326 }
327327
328− pub async fn continue_thread(&mut self, thread_id: ThreadId) -> Result<Option<bool>> {
328+ pub async fn continue_thread(&self, thread_id: ThreadId) -> Result<Option<bool>> {
329329 let args = requests::ContinueArguments { thread_id };
330330
331331 let response = self.request::<requests::Continue>(args).await?;
@@ -333,7 +333,7 @@ impl Client {
333333 }
334334
335335 pub async fn stack_trace(
336− &mut self,
336+ &self,
337337 thread_id: ThreadId,
338338 ) -> Result<(Vec<StackFrame>, Option<usize>)> {
339339 let args = requests::StackTraceArguments {
@@ -347,19 +347,19 @@ impl Client {
347347 Ok((response.stack_frames, response.total_frames))
348348 }
349349
350− pub async fn threads(&mut self) -> Result<Vec<Thread>> {
350+ pub async fn threads(&self) -> Result<Vec<Thread>> {
351351 let response = self.request::<requests::Threads>(()).await?;
352352 Ok(response.threads)
353353 }
354354
355− pub async fn scopes(&mut self, frame_id: usize) -> Result<Vec<Scope>> {
355+ pub async fn scopes(&self, frame_id: usize) -> Result<Vec<Scope>> {
356356 let args = requests::ScopesArguments { frame_id };
357357
358358 let response = self.request::<requests::Scopes>(args).await?;
359359 Ok(response.scopes)
360360 }
361361
362− pub async fn variables(&mut self, variables_reference: usize) -> Result<Vec<Variable>> {
362+ pub async fn variables(&self, variables_reference: usize) -> Result<Vec<Variable>> {
363363 let args = requests::VariablesArguments {
364364 variables_reference,
365365 filter: None,
@@ -372,7 +372,7 @@ impl Client {
372372 Ok(response.variables)
373373 }
374374
375− pub async fn step_in(&mut self, thread_id: ThreadId) -> Result<()> {
375+ pub async fn step_in(&self, thread_id: ThreadId) -> Result<()> {
376376 let args = requests::StepInArguments {
377377 thread_id,
378378 target_id: None,
@@ -382,7 +382,7 @@ impl Client {
382382 self.request::<requests::StepIn>(args).await
383383 }
384384
385− pub async fn step_out(&mut self, thread_id: ThreadId) -> Result<()> {
385+ pub async fn step_out(&self, thread_id: ThreadId) -> Result<()> {
386386 let args = requests::StepOutArguments {
387387 thread_id,
388388 granularity: None,
@@ -391,7 +391,7 @@ impl Client {
391391 self.request::<requests::StepOut>(args).await
392392 }
393393
394− pub async fn next(&mut self, thread_id: ThreadId) -> Result<()> {
394+ pub async fn next(&self, thread_id: ThreadId) -> Result<()> {
395395 let args = requests::NextArguments {
396396 thread_id,
397397 granularity: None,
@@ -400,14 +400,14 @@ impl Client {
400400 self.request::<requests::Next>(args).await
401401 }
402402
403− pub async fn pause(&mut self, thread_id: ThreadId) -> Result<()> {
403+ pub async fn pause(&self, thread_id: ThreadId) -> Result<()> {
404404 let args = requests::PauseArguments { thread_id };
405405
406406 self.request::<requests::Pause>(args).await
407407 }
408408
409409 pub async fn eval(
410− &mut self,
410+ &self,
411411 expression: String,
412412 frame_id: Option<usize>,
413413 ) -> Result<requests::EvaluateResponse> {
@@ -422,7 +422,7 @@ impl Client {
422422 }
423423
424424 pub async fn set_exception_breakpoints(
425− &mut self,
425+ &self,
426426 filters: Vec<String>,
427427 ) -> Result<Option<Vec<Breakpoint>>> {
428428 let args = requests::SetExceptionBreakpointsArguments { filters };