lonng / yinyue

MV and MP3 downloader for NetEase cloud music (https://music.163.com)
48 stars 11 forks source link

Fix url crate compile error #4

Closed xiaochuanyu closed 4 years ago

xiaochuanyu commented 4 years ago

I got an error related to url crate running cargo build --release:

   Compiling url v1.7.0
error[E0713]: borrow may still be in use when destructor runs
   --> C:\Users\xiao\.cargo\registry\src\github.com-1ecc6299db9ec823\url-1.7.0\src\form_urlencoded.rs:261:40
    |
259 | impl<'a> Target for ::UrlQuery<'a> {
    |      -- lifetime `'a` defined here
260 |     fn as_mut_string(&mut self) -> &mut String { &mut self.url.serialization }
261 |     fn finish(self) -> &'a mut ::Url { self.url }
    |                                        ^^^^^^^^ - here, drop of `self` needs exclusive access to `*self.url`, because the type `UrlQuery<'_>` implements the `Drop` trait
    |                                        |
    |                                        returning this value requires that `*self.url` is borrowed for `'a`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0713`.
error: could not compile `url`.

This PR fixes that error by pinning url to version 1.7.2.

lonng commented 4 years ago

@xiaochuanyu Thanks for your contribution.