Replace to_string with to_owned (#960)

This commit is contained in:
takumi 2022-04-24 16:05:00 +08:00 committed by GitHub
parent 0d2c61c472
commit 98795b7f75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -520,7 +520,7 @@ where
}
fn replace_trailing_slash(uri: &Uri, new_path: &str) -> Uri {
let mut new_path_and_query = new_path.to_string();
let mut new_path_and_query = new_path.to_owned();
if let Some(query) = uri.query() {
new_path_and_query.push('?');
new_path_and_query.push_str(query);