diff --git a/actix-web/src/middleware/logger.rs b/actix-web/src/middleware/logger.rs index 5c4d315f1..5fec5a013 100644 --- a/actix-web/src/middleware/logger.rs +++ b/actix-web/src/middleware/logger.rs @@ -634,9 +634,9 @@ impl FormatText { *self = FormatText::Str(s.to_string()) } - FormatText::CustomResponse(_, status_fn) => { - let text = match status_fn { - Some(status_fn) => FormatText::Str(status_fn.call(res)), + FormatText::CustomResponse(_, res_fn) => { + let text = match res_fn { + Some(res_fn) => FormatText::Str(res_fn.call(res)), None => FormatText::Str("-".to_owned()), };