diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2022-03-24 13:50:47 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2022-03-24 13:50:47 +0300 |
commit | 88edc93a8a6d55c840fbd843bcf3efb2f5a8fa88 (patch) | |
tree | 2d515e6b5717ceb3d32e24d3bfad425f592f5279 /net/reqwest | |
parent | c6feb31207aed8a570995c3d61ed2c6535ca10df (diff) |
reqwest: Don't unnecessarily borrow dereferenced values explicitly
warning: this expression borrows a value the compiler would automatically borrow
--> net/reqwest/tests/reqwesthttpsrc.rs:126:56
|
126 | async move { Ok::<_, hyper::Error>((&mut *http_func.lock().unwrap())(req)) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*http_func.lock().unwrap())`
|
= note: `#[warn(clippy::needless_borrow)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Diffstat (limited to 'net/reqwest')
-rw-r--r-- | net/reqwest/tests/reqwesthttpsrc.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/reqwest/tests/reqwesthttpsrc.rs b/net/reqwest/tests/reqwesthttpsrc.rs index 5cde00d50..5dc7ff347 100644 --- a/net/reqwest/tests/reqwesthttpsrc.rs +++ b/net/reqwest/tests/reqwesthttpsrc.rs @@ -123,7 +123,7 @@ impl Harness { let http_func = http_func.clone(); Ok::<_, hyper::Error>(service_fn(move |req| { let http_func = http_func.clone(); - async move { Ok::<_, hyper::Error>((&mut *http_func.lock().unwrap())(req)) } + async move { Ok::<_, hyper::Error>((*http_func.lock().unwrap())(req)) } })) } }); |