mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
clippy: Address the issue 'needless-borrow'
Issue from beta verion of clippy:
Error: --> vm-virtio/src/queue.rs:700:59
|
700 | if let Some(used_event) = self.get_used_event(&mem) {
| ^^^^ help: change this to: `mem`
|
= note: `-D clippy::needless-borrow` implied by `-D warnings`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
@@ -241,7 +241,7 @@ fn handle_http_request(
|
||||
let path = request.uri().get_abs_path().to_string();
|
||||
let mut response = match HTTP_ROUTES.routes.get(&path) {
|
||||
Some(route) => match api_notifier.try_clone() {
|
||||
Ok(notifier) => route.handle_request(&request, notifier, api_sender.clone()),
|
||||
Ok(notifier) => route.handle_request(request, notifier, api_sender.clone()),
|
||||
Err(_) => error_response(
|
||||
HttpError::InternalServerError,
|
||||
StatusCode::InternalServerError,
|
||||
|
||||
Reference in New Issue
Block a user