Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Url::into_string deprecation warning #9475

Merged
merged 2 commits into from
May 10, 2021
Merged

Fix Url::into_string deprecation warning #9475

merged 2 commits into from
May 10, 2021

Conversation

PaulDance
Copy link
Contributor

@PaulDance PaulDance commented May 10, 2021

warning: use of deprecated associated function `url::Url::into_string`: use Into<String>
   --> src/registry.rs:183:26
    |
183 |                 dl_url().into_string(),
    |                          ^^^^^^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default

is being emitted when running cargo build directly from the crates/cargo-test-support or the crates/mdman crate. This simply proposes a switch to the recommended method in order to resolve the deprecation warning.

@rust-highfive
Copy link

r? @alexcrichton

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 10, 2021
@ehuss
Copy link
Contributor

ehuss commented May 10, 2021

r? @ehuss

Would you mind also updating the version in Cargo.toml of url to 2.2.2? It looks like the TryFrom implementation was added in 2.2.

@rust-highfive rust-highfive assigned ehuss and unassigned alexcrichton May 10, 2021
@PaulDance
Copy link
Contributor Author

Correct. It did in fact cause an issue when building on my side prior to running cargo update, which had me greatly confused for a moment. Will do now.

@PaulDance PaulDance changed the title Fix test support deprecation warning Fix Url::into_string deprecation warning May 10, 2021
`url::Url::into_string` is deprecated. The `Into<String>` implementation
is now used.

Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
The base package, `cargo-test-support` and `mdman`.

Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
@PaulDance
Copy link
Contributor Author

I noticed it was also used in mdman, so I fixed it there as well.

@ehuss
Copy link
Contributor

ehuss commented May 10, 2021

Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented May 10, 2021

📌 Commit a5b4b47 has been approved by ehuss

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 10, 2021
@bors
Copy link
Contributor

bors commented May 10, 2021

⌛ Testing commit a5b4b47 with merge e5fdd48...

@bors
Copy link
Contributor

bors commented May 10, 2021

☀️ Test successful - checks-actions
Approved by: ehuss
Pushing e5fdd48 to master...

@bors bors merged commit e5fdd48 into rust-lang:master May 10, 2021
@PaulDance PaulDance deleted the fix-test-support-warning branch May 10, 2021 22:06
bors added a commit to rust-lang-ci/rust that referenced this pull request May 12, 2021
Update cargo

8 commits in e51522ab3db23b0d8f1de54eb1f0113924896331..070e459c2d8b79c5b2ac5218064e7603329c92ae
2021-05-07 21:29:52 +0000 to 2021-05-11 18:12:23 +0000
- Fix rustdoc warnings (rust-lang/cargo#9468)
- Improve performance of git status check in `cargo package`. (rust-lang/cargo#9478)
- Link to the new rustc tests chapter. (rust-lang/cargo#9477)
- Bump index cache version to deal with semver metadata version mismatch. (rust-lang/cargo#9476)
- Fix Url::into_string deprecation warning (rust-lang/cargo#9475)
- Fix rust-lang/cargo#4482 and rust-lang/cargo#9449: set Fossil ignore and clean settings locally (rust-lang/cargo#9469)
- Improve two error messages (rust-lang/cargo#9472)
- Fix `cargo install` with a semver metadata version. (rust-lang/cargo#9467)
@ehuss ehuss added this to the 1.54.0 milestone Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants