From 3a65f84b129100d405d7e441a29a1d4659517704 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Mon, 27 May 2019 12:56:09 +1000 Subject: [PATCH] Improve comments for `http_server` --- beacon_node/http_server/src/api.rs | 1 + beacon_node/http_server/src/lib.rs | 2 +- beacon_node/http_server/src/metrics.rs | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/beacon_node/http_server/src/api.rs b/beacon_node/http_server/src/api.rs index c89cacd9a..11afdb9df 100644 --- a/beacon_node/http_server/src/api.rs +++ b/beacon_node/http_server/src/api.rs @@ -11,6 +11,7 @@ use router::Router; use serde_json::json; use std::sync::Arc; +/// Yields a handler for the HTTP API. pub fn build_handler( beacon_chain: Arc>, ) -> impl Handler { diff --git a/beacon_node/http_server/src/lib.rs b/beacon_node/http_server/src/lib.rs index 8f6378e9a..77665db8d 100644 --- a/beacon_node/http_server/src/lib.rs +++ b/beacon_node/http_server/src/lib.rs @@ -87,7 +87,7 @@ pub fn start_service( info!(log, "HTTP server shutting down"); if let Ok(mut server) = server_start_result { - // According to the documentation, this function "doesn't work" and the server + // According to the documentation, `server.close()` "doesn't work" and the server // keeps listening. // // It is being called anyway, because it seems like the right thing to do. If you diff --git a/beacon_node/http_server/src/metrics.rs b/beacon_node/http_server/src/metrics.rs index 57fa70623..30acb8853 100644 --- a/beacon_node/http_server/src/metrics.rs +++ b/beacon_node/http_server/src/metrics.rs @@ -8,6 +8,7 @@ use slot_clock::SlotClock; use std::sync::Arc; use types::Slot; +/// Yields a handler for the metrics endpoint. pub fn build_handler( beacon_chain: Arc>, ) -> impl Handler {