1
0
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:
Rob Ede
2024-02-07 03:47:30 +00:00
committed by GitHub
parent 7e4e12b0aa
commit 1e2ef6f92f
29 changed files with 75 additions and 61 deletions

View File

@@ -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();
}
}