mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-16 03:12:41 +00:00
Cleaning up the rest of the API functions.
- Removed all unused imports - Fixed random compiler errors - Removed all of the 'sucess_response' helpers. - Enabled all of the API endpoints again, wrapping in 'into_boxfut' - Tidied up /metrics endpoint - Added a 'body_text' part to ResponseBuilder, mainly for the Prometheus /metrics endpoint - Cleaned up the unnecessary helpers::* imports, to be more explicit.
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
use crate::BoxFut;
|
||||
use futures::future::IntoFuture;
|
||||
use futures::Future;
|
||||
use hyper::{Body, Method, Request, Response, Server, StatusCode};
|
||||
use hyper::{Body, Response, StatusCode};
|
||||
use std::error::Error as StdError;
|
||||
|
||||
#[derive(PartialEq, Debug, Clone)]
|
||||
@@ -71,7 +69,7 @@ impl From<hyper::error::Error> for ApiError {
|
||||
}
|
||||
|
||||
impl StdError for ApiError {
|
||||
fn cause(&self) -> Option<&StdError> {
|
||||
fn cause(&self) -> Option<&dyn StdError> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user