1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-21 07:36:43 +00:00

Move path call inline into write

This commit is contained in:
Glade Miller 2018-03-13 13:26:13 -06:00
parent 401c0ad809
commit 08504e0892

View file

@ -110,10 +110,11 @@ impl HttpClientWriter {
self.flags.insert(Flags::UPGRADE);
}
let path = msg.uri().path_and_query().map(|u| u.as_str()).unwrap_or("");
// status line
let _ = write!(buffer, "{} {} {:?}\r\n",
msg.method(), path, msg.version());
msg.method(),
msg.uri().path_and_query().map(|u| u.as_str()).unwrap_or(""),
msg.version());
// write headers
for (key, value) in msg.headers() {