diff --git a/coverage_config.json b/coverage_config.json index ecf738b..750586a 100644 --- a/coverage_config.json +++ b/coverage_config.json @@ -1 +1 @@ -{"coverage_score": 92.4, "exclude_path": "", "crate_features": ""} +{"coverage_score": 92.5, "exclude_path": "", "crate_features": ""} diff --git a/src/response.rs b/src/response.rs index 216a43c..5e0cb79 100644 --- a/src/response.rs +++ b/src/response.rs @@ -27,6 +27,8 @@ pub enum StatusCode { InternalServerError, /// 501, Not Implemented NotImplemented, + /// 503, Service Unavailable + ServiceUnavailable, } impl StatusCode { @@ -40,6 +42,7 @@ impl StatusCode { StatusCode::NotFound => b"404", StatusCode::InternalServerError => b"500", StatusCode::NotImplemented => b"501", + StatusCode::ServiceUnavailable => b"503", } } } @@ -285,5 +288,6 @@ mod tests { assert_eq!(StatusCode::NotFound.raw(), b"404"); assert_eq!(StatusCode::InternalServerError.raw(), b"500"); assert_eq!(StatusCode::NotImplemented.raw(), b"501"); + assert_eq!(StatusCode::ServiceUnavailable.raw(), b"503"); } }