mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-31 17:07:01 +02:00
perf: remove unnecessary allocation when writing http dates (#3261)
This commit is contained in:
@@ -28,7 +28,7 @@ impl Date {
|
||||
|
||||
fn update(&mut self) {
|
||||
self.pos = 0;
|
||||
write!(self, "{}", httpdate::fmt_http_date(SystemTime::now())).unwrap();
|
||||
write!(self, "{}", httpdate::HttpDate::from(SystemTime::now())).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user