diff options
author | Maan2003 <[email protected]> | 2021-06-13 05:05:29 +0100 |
---|---|---|
committer | Maan2003 <[email protected]> | 2021-06-13 05:05:29 +0100 |
commit | c50b4579ec842ac7c1f52e0e3c834d50fc9cd1bb (patch) | |
tree | e70b18936d014aa3038c4a6283e200f0a479aeb1 /crates/rust-analyzer | |
parent | 75370312fbfe072947ffdc568eebc9cb4c6108e4 (diff) |
clippy::useless_return
Diffstat (limited to 'crates/rust-analyzer')
-rw-r--r-- | crates/rust-analyzer/src/dispatch.rs | 4 | ||||
-rw-r--r-- | crates/rust-analyzer/src/main_loop.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/rust-analyzer/src/dispatch.rs b/crates/rust-analyzer/src/dispatch.rs index 2011a4132..5991e72b5 100644 --- a/crates/rust-analyzer/src/dispatch.rs +++ b/crates/rust-analyzer/src/dispatch.rs | |||
@@ -104,7 +104,7 @@ impl<'a> RequestDispatcher<'a> { | |||
104 | 104 | ||
105 | let res = crate::from_json(R::METHOD, req.params); | 105 | let res = crate::from_json(R::METHOD, req.params); |
106 | match res { | 106 | match res { |
107 | Ok(params) => return Some((req.id, params)), | 107 | Ok(params) => Some((req.id, params)), |
108 | Err(err) => { | 108 | Err(err) => { |
109 | let response = lsp_server::Response::new_err( | 109 | let response = lsp_server::Response::new_err( |
110 | req.id, | 110 | req.id, |
@@ -112,7 +112,7 @@ impl<'a> RequestDispatcher<'a> { | |||
112 | err.to_string(), | 112 | err.to_string(), |
113 | ); | 113 | ); |
114 | self.global_state.respond(response); | 114 | self.global_state.respond(response); |
115 | return None; | 115 | None |
116 | } | 116 | } |
117 | } | 117 | } |
118 | } | 118 | } |
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs index fa5fc6fbf..1417d8379 100644 --- a/crates/rust-analyzer/src/main_loop.rs +++ b/crates/rust-analyzer/src/main_loop.rs | |||
@@ -701,7 +701,7 @@ impl GlobalState { | |||
701 | }, | 701 | }, |
702 | ); | 702 | ); |
703 | 703 | ||
704 | return Ok(()); | 704 | Ok(()) |
705 | })? | 705 | })? |
706 | .on::<lsp_types::notification::DidChangeWatchedFiles>(|this, params| { | 706 | .on::<lsp_types::notification::DidChangeWatchedFiles>(|this, params| { |
707 | for change in params.changes { | 707 | for change in params.changes { |