mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-28 09:42:40 +01:00
Move path call inline into write
This commit is contained in:
parent
401c0ad809
commit
08504e0892
@ -110,10 +110,11 @@ impl HttpClientWriter {
|
|||||||
self.flags.insert(Flags::UPGRADE);
|
self.flags.insert(Flags::UPGRADE);
|
||||||
}
|
}
|
||||||
|
|
||||||
let path = msg.uri().path_and_query().map(|u| u.as_str()).unwrap_or("");
|
|
||||||
// status line
|
// status line
|
||||||
let _ = write!(buffer, "{} {} {:?}\r\n",
|
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
|
// write headers
|
||||||
for (key, value) in msg.headers() {
|
for (key, value) in msg.headers() {
|
||||||
|
Loading…
Reference in New Issue
Block a user