Addressed Paul's suggestions.

- Updated some comments.
 - Replaced match statements with map functions.
This commit is contained in:
Luke Anderson
2019-09-04 13:43:45 +10:00
parent b432c8c58c
commit 0c1ceab527
3 changed files with 74 additions and 104 deletions

View File

@@ -67,7 +67,7 @@ pub fn get_prometheus<T: BeaconChainTypes + 'static>(req: Request<Body>) -> ApiR
String::from_utf8(buffer)
.map(|string| {
let mut response = success_response(Body::from(string));
// Need to change the header to text/plain for prometheius
// Need to change the header to text/plain for prometheus
response.headers_mut().insert(
"content-type",
HeaderValue::from_static("text/plain; charset=utf-8"),