Fix tons of warnings in newest nightly (#2784)

* Fix tons of warnings in newest nightly

* Fix sr-api-macro doc tests
This commit is contained in:
Bastian Köcher
2019-06-04 20:09:49 +02:00
committed by GitHub
parent 9700029203
commit 6142f95611
73 changed files with 359 additions and 316 deletions
+1 -1
View File
@@ -151,7 +151,7 @@ pub fn import_blocks<F, E, R>(
let (header, extrinsics) = signed.block.deconstruct();
let hash = header.hash();
let block = message::BlockData::<F::Block> {
hash: hash,
hash,
justification: signed.justification,
header: Some(header),
body: Some(extrinsics),
+6 -6
View File
@@ -139,7 +139,7 @@ pub trait StartRPC<C: Components> {
fn start_rpc(
client: Arc<ComponentClient<C>>,
network: Arc<network::SyncProvider<ComponentBlock<C>>>,
network: Arc<dyn network::SyncProvider<ComponentBlock<C>>>,
should_have_peers: bool,
system_info: SystemInfo,
rpc_http: Option<SocketAddr>,
@@ -159,7 +159,7 @@ impl<C: Components> StartRPC<Self> for C where
fn start_rpc(
client: Arc<ComponentClient<C>>,
network: Arc<network::SyncProvider<ComponentBlock<C>>>,
network: Arc<dyn network::SyncProvider<ComponentBlock<C>>>,
should_have_peers: bool,
rpc_system_info: SystemInfo,
rpc_http: Option<SocketAddr>,
@@ -339,7 +339,7 @@ pub trait ServiceFactory: 'static + Sized {
/// Build finality proof provider for serving network requests on full node.
fn build_finality_proof_provider(
client: Arc<FullClient<Self>>
) -> Result<Option<Arc<FinalityProofProvider<Self::Block>>>, error::Error>;
) -> Result<Option<Arc<dyn FinalityProofProvider<Self::Block>>>, error::Error>;
/// Build the Fork Choice algorithm for full client
fn build_select_chain(
@@ -435,7 +435,7 @@ pub trait Components: Sized + 'static {
/// Finality proof provider for serving network requests.
fn build_finality_proof_provider(
client: Arc<ComponentClient<Self>>
) -> Result<Option<Arc<FinalityProofProvider<<Self::Factory as ServiceFactory>::Block>>>, error::Error>;
) -> Result<Option<Arc<dyn FinalityProofProvider<<Self::Factory as ServiceFactory>::Block>>>, error::Error>;
/// Build fork choice selector
fn build_select_chain(
@@ -536,7 +536,7 @@ impl<Factory: ServiceFactory> Components for FullComponents<Factory> {
fn build_finality_proof_provider(
client: Arc<ComponentClient<Self>>
) -> Result<Option<Arc<FinalityProofProvider<<Self::Factory as ServiceFactory>::Block>>>, error::Error> {
) -> Result<Option<Arc<dyn FinalityProofProvider<<Self::Factory as ServiceFactory>::Block>>>, error::Error> {
Factory::build_finality_proof_provider(client)
}
}
@@ -619,7 +619,7 @@ impl<Factory: ServiceFactory> Components for LightComponents<Factory> {
fn build_finality_proof_provider(
_client: Arc<ComponentClient<Self>>
) -> Result<Option<Arc<FinalityProofProvider<<Self::Factory as ServiceFactory>::Block>>>, error::Error> {
) -> Result<Option<Arc<dyn FinalityProofProvider<<Self::Factory as ServiceFactory>::Block>>>, error::Error> {
Ok(None)
}
fn build_select_chain(
+2 -2
View File
@@ -80,7 +80,7 @@ pub struct Service<Components: components::Components> {
signal: Option<Signal>,
/// Configuration of this Service
pub config: FactoryFullConfiguration<Components::Factory>,
_rpc: Box<::std::any::Any + Send + Sync>,
_rpc: Box<dyn std::any::Any + Send + Sync>,
_telemetry: Option<Arc<tel::Telemetry>>,
_offchain_workers: Option<Arc<offchain::OffchainWorkers<ComponentClient<Components>, ComponentBlock<Components>>>>,
_telemetry_on_connect_sinks: Arc<Mutex<Vec<mpsc::UnboundedSender<()>>>>,
@@ -104,7 +104,7 @@ pub type TelemetryOnConnectNotifications = mpsc::UnboundedReceiver<()>;
/// Used to hook on telemetry connection established events.
pub struct TelemetryOnConnect<'a> {
/// Handle to a future that will resolve on exit.
pub on_exit: Box<Future<Item=(), Error=()> + Send + 'static>,
pub on_exit: Box<dyn Future<Item=(), Error=()> + Send + 'static>,
/// Event stream.
pub telemetry_connection_sinks: TelemetryOnConnectNotifications,
/// Executor to which the hook is spawned.