Skip to content

Commit ceea6f0

Browse files
use read only extensions method and find, rather than mut_extensions and pop
1 parent 753c4f8 commit ceea6f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/middleware/log_request.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl Handler for LogRequests {
3131
let response_time =
3232
response_time.as_secs() * 1000 + u64::from(response_time.subsec_nanos()) / 1_000_000;
3333

34-
if let Some(metadata_length) = req.mut_extensions().pop::<u64>() {
34+
if let Some(metadata_length) = req.extensions().find::<u64>() {
3535
print!(
3636
"at={level} method={method} path=\"{path}\" \
3737
request_id={request_id} fwd=\"{ip}\" service={time_ms}ms \

0 commit comments

Comments
 (0)