Address Michael's comments

This commit is contained in:
Paul Hauner
2019-11-25 15:11:27 +11:00
parent 6bf73e2b55
commit 65cbf601ae
11 changed files with 42 additions and 54 deletions

View File

@@ -7,7 +7,7 @@ use std::sync::Arc;
use types::EthSpec;
/// HTTP handler to return the full spec object.
pub fn get_spec<T: BeaconChainTypes + 'static>(
pub fn get_spec<T: BeaconChainTypes>(
req: Request<Body>,
beacon_chain: Arc<BeaconChain<T>>,
) -> ApiResult {
@@ -15,7 +15,7 @@ pub fn get_spec<T: BeaconChainTypes + 'static>(
}
/// HTTP handler to return the full Eth2Config object.
pub fn get_eth2_config<T: BeaconChainTypes + 'static>(
pub fn get_eth2_config<T: BeaconChainTypes>(
req: Request<Body>,
eth2_config: Arc<Eth2Config>,
) -> ApiResult {
@@ -23,6 +23,6 @@ pub fn get_eth2_config<T: BeaconChainTypes + 'static>(
}
/// HTTP handler to return the full spec object.
pub fn get_slots_per_epoch<T: BeaconChainTypes + 'static>(req: Request<Body>) -> ApiResult {
pub fn get_slots_per_epoch<T: BeaconChainTypes>(req: Request<Body>) -> ApiResult {
ResponseBuilder::new(&req)?.body(&T::EthSpec::slots_per_epoch())
}