| ('|', '=', None)
| ('|', '|', None) => {
let tt2 = self.next().unwrap().clone();
- Ok(tt::Subtree { delimiter: None, token_trees: vec![tt.clone(), tt2] }.into())
+ Ok(tt::Subtree { delimiter: None, token_trees: vec![tt, tt2] }.into())
}
_ => Ok(tt),
}
// https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/dlsym.3.html
// Unlike other dyld API's, the symbol name passed to dlsym() must NOT be
// prepended with an underscore.
- if s.name.starts_with("_") {
+ if s.name.starts_with('_') {
&s.name[1..]
} else {
&s.name
if let Some((method, start)) = self.req_queue.incoming.complete(response.id.clone()) {
let duration = start.elapsed();
log::info!("handled req#{} in {:?}", response.id, duration);
- let metrics =
- RequestMetrics { id: response.id.clone(), method: method.to_string(), duration };
+ let metrics = RequestMetrics { id: response.id.clone(), method, duration };
self.latest_requests.write().record(metrics);
self.send(response.into());
}