Migrate everything to the 2018 edition (#1758)

This commit is contained in:
Stanislav Tkach
2019-02-13 12:45:59 +02:00
committed by Gav Wood
parent a61c218cc3
commit ff5e4ca87e
38 changed files with 75 additions and 116 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ substrate-executor = { path = "../core/executor" }
substrate-service = { path = "../core/service" }
inherents = { package = "substrate-inherents", path = "../core/inherents" }
transaction-pool = { package = "substrate-transaction-pool", path = "../core/transaction-pool" }
substrate-network = { path = "../core/network" }
network = { package = "substrate-network", path = "../core/network" }
consensus = { package = "substrate-consensus-aura", path = "../core/consensus/aura" }
substrate-client = { path = "../core/client" }
basic-authorship = { package = "substrate-basic-authorship", path = "../core/basic-authorship" }
+2 -6
View File
@@ -6,12 +6,8 @@
#![recursion_limit="256"]
#[cfg(feature = "std")]
#[macro_use]
extern crate serde_derive;
#[macro_use]
extern crate parity_codec_derive;
use serde_derive::{Serialize, Deserialize};
use parity_codec_derive::{Encode, Decode};
use rstd::prelude::*;
#[cfg(feature = "std")]
use primitives::bytes;
+1
View File
@@ -7,6 +7,7 @@ use substrate_cli::{informant, parse_and_execute, NoCustom};
use substrate_service::{ServiceFactory, Roles as ServiceRoles};
use crate::chain_spec;
use std::ops::Deref;
use log::info;
/// Parse command line arguments into service configuration.
pub fn run<I, T, E>(args: I, exit: E, version: VersionInfo) -> error::Result<()> where
+1 -12
View File
@@ -3,17 +3,6 @@
#![warn(missing_docs)]
#![warn(unused_extern_crates)]
#[macro_use]
extern crate error_chain;
#[macro_use]
extern crate log;
#[macro_use]
extern crate substrate_network as network;
#[macro_use]
extern crate substrate_executor;
#[macro_use]
extern crate substrate_service;
mod chain_spec;
mod service;
mod cli;
@@ -33,4 +22,4 @@ fn run() -> cli::error::Result<()> {
cli::run(::std::env::args(), cli::Exit, version)
}
quick_main!(run);
error_chain::quick_main!(run);
+4
View File
@@ -3,6 +3,7 @@
#![warn(unused_extern_crates)]
use std::sync::Arc;
use log::info;
use transaction_pool::{self, txpool::{Pool as TransactionPool}};
use node_template_runtime::{self, GenesisConfig, opaque::Block, RuntimeApi};
use substrate_service::{
@@ -16,6 +17,9 @@ use consensus::{import_queue, start_aura, AuraImportQueue, SlotDuration, Nothing
use substrate_client as client;
use primitives::ed25519::Pair;
use inherents::InherentDataProviders;
use network::construct_simple_protocol;
use substrate_executor::native_executor_instance;
use substrate_service::construct_service_factory;
pub use substrate_executor::NativeExecutor;
// Our native executor instance.