aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_mbe/src/mbe_expander/matcher.rs2
-rw-r--r--crates/ra_proc_macro_srv/src/dylib.rs2
-rw-r--r--crates/rust-analyzer/src/global_state.rs3
3 files changed, 3 insertions, 4 deletions
diff --git a/crates/ra_mbe/src/mbe_expander/matcher.rs b/crates/ra_mbe/src/mbe_expander/matcher.rs
index 78f9efa1b..f9e515b81 100644
--- a/crates/ra_mbe/src/mbe_expander/matcher.rs
+++ b/crates/ra_mbe/src/mbe_expander/matcher.rs
@@ -260,7 +260,7 @@ impl<'a> TtIter<'a> {
260 | ('|', '=', None) 260 | ('|', '=', None)
261 | ('|', '|', None) => { 261 | ('|', '|', None) => {
262 let tt2 = self.next().unwrap().clone(); 262 let tt2 = self.next().unwrap().clone();
263 Ok(tt::Subtree { delimiter: None, token_trees: vec![tt.clone(), tt2] }.into()) 263 Ok(tt::Subtree { delimiter: None, token_trees: vec![tt, tt2] }.into())
264 } 264 }
265 _ => Ok(tt), 265 _ => Ok(tt),
266 } 266 }
diff --git a/crates/ra_proc_macro_srv/src/dylib.rs b/crates/ra_proc_macro_srv/src/dylib.rs
index aa84e951c..1addbbd54 100644
--- a/crates/ra_proc_macro_srv/src/dylib.rs
+++ b/crates/ra_proc_macro_srv/src/dylib.rs
@@ -45,7 +45,7 @@ fn find_registrar_symbol(file: &Path) -> io::Result<Option<String>> {
45 // https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/dlsym.3.html 45 // https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/dlsym.3.html
46 // Unlike other dyld API's, the symbol name passed to dlsym() must NOT be 46 // Unlike other dyld API's, the symbol name passed to dlsym() must NOT be
47 // prepended with an underscore. 47 // prepended with an underscore.
48 if s.name.starts_with("_") { 48 if s.name.starts_with('_') {
49 &s.name[1..] 49 &s.name[1..]
50 } else { 50 } else {
51 &s.name 51 &s.name
diff --git a/crates/rust-analyzer/src/global_state.rs b/crates/rust-analyzer/src/global_state.rs
index 640b3959d..c8d34e15a 100644
--- a/crates/rust-analyzer/src/global_state.rs
+++ b/crates/rust-analyzer/src/global_state.rs
@@ -204,8 +204,7 @@ impl GlobalState {
204 if let Some((method, start)) = self.req_queue.incoming.complete(response.id.clone()) { 204 if let Some((method, start)) = self.req_queue.incoming.complete(response.id.clone()) {
205 let duration = start.elapsed(); 205 let duration = start.elapsed();
206 log::info!("handled req#{} in {:?}", response.id, duration); 206 log::info!("handled req#{} in {:?}", response.id, duration);
207 let metrics = 207 let metrics = RequestMetrics { id: response.id.clone(), method, duration };
208 RequestMetrics { id: response.id.clone(), method: method.to_string(), duration };
209 self.latest_requests.write().record(metrics); 208 self.latest_requests.write().record(metrics);
210 self.send(response.into()); 209 self.send(response.into());
211 } 210 }