Resolve needless_borrow pedantic clippy lint in test

error: the borrowed expression implements the required traits
      --> tests/data/build.rs:23:43
       |
    23 |     let response = reqwest::blocking::get(&url)?.error_for_status()?;
       |                                           ^^^^ help: change this to: `url`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
       = note: `-D clippy::needless-borrow` implied by `-D clippy::all`
This commit is contained in:
David Tolnay 2022-10-24 21:32:58 -07:00
parent 6a235b324e
commit 447a4caa09
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82

View file

@ -20,7 +20,7 @@ fn main() {
fn download_and_unpack() -> Result<()> {
let url = format!("https://github.com/yaml/yaml-test-suite/archive/refs/tags/{TAG}.tar.gz");
let response = reqwest::blocking::get(&url)?.error_for_status()?;
let response = reqwest::blocking::get(url)?.error_for_status()?;
let decoder = GzDecoder::new(response);
let mut archive = Archive::new(decoder);
let prefix = format!("yaml-test-suite-{}", TAG);