From 98795b7f7505e403b4719c8139a984e7acea193b Mon Sep 17 00:00:00 2001 From: takumi Date: Sun, 24 Apr 2022 16:05:00 +0800 Subject: [PATCH] Replace to_string with to_owned (#960) --- axum/src/routing/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/axum/src/routing/mod.rs b/axum/src/routing/mod.rs index a44bb3d1..ca178a75 100644 --- a/axum/src/routing/mod.rs +++ b/axum/src/routing/mod.rs @@ -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);