perf(all): replace &str.to_string() with .to_owned()
This commit is contained in:
		| @@ -430,7 +430,7 @@ mod tests { | ||||
|         client.set_redirect_policy(RedirectPolicy::FollowAll); | ||||
|  | ||||
|         let res = client.get("http://127.0.0.1").send().unwrap(); | ||||
|         assert_eq!(res.headers.get(), Some(&Server("mock3".to_string()))); | ||||
|         assert_eq!(res.headers.get(), Some(&Server("mock3".to_owned()))); | ||||
|     } | ||||
|  | ||||
|     #[test] | ||||
| @@ -438,7 +438,7 @@ mod tests { | ||||
|         let mut client = Client::with_connector(MockRedirectPolicy); | ||||
|         client.set_redirect_policy(RedirectPolicy::FollowNone); | ||||
|         let res = client.get("http://127.0.0.1").send().unwrap(); | ||||
|         assert_eq!(res.headers.get(), Some(&Server("mock1".to_string()))); | ||||
|         assert_eq!(res.headers.get(), Some(&Server("mock1".to_owned()))); | ||||
|     } | ||||
|  | ||||
|     #[test] | ||||
| @@ -449,7 +449,7 @@ mod tests { | ||||
|         let mut client = Client::with_connector(MockRedirectPolicy); | ||||
|         client.set_redirect_policy(RedirectPolicy::FollowIf(follow_if)); | ||||
|         let res = client.get("http://127.0.0.1").send().unwrap(); | ||||
|         assert_eq!(res.headers.get(), Some(&Server("mock2".to_string()))); | ||||
|         assert_eq!(res.headers.get(), Some(&Server("mock2".to_owned()))); | ||||
|     } | ||||
|  | ||||
|     /// Tests that the `Client::set_ssl_verifier` method does not drop the | ||||
|   | ||||
| @@ -172,7 +172,7 @@ mod tests { | ||||
|             None => panic!("Transfer-Encoding: chunked expected!"), | ||||
|         }; | ||||
|         // The body is correct? | ||||
|         assert_eq!(read_to_string(res).unwrap(), "qwert".to_string()); | ||||
|         assert_eq!(read_to_string(res).unwrap(), "qwert".to_owned()); | ||||
|     } | ||||
|  | ||||
|     /// Tests that when a chunk size is not a valid radix-16 number, an error | ||||
| @@ -229,6 +229,6 @@ mod tests { | ||||
|  | ||||
|         let res = Response::new(Box::new(stream)).unwrap(); | ||||
|  | ||||
|         assert_eq!(read_to_string(res).unwrap(), "1".to_string()); | ||||
|         assert_eq!(read_to_string(res).unwrap(), "1".to_owned()); | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user