mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 19:17:58 +00:00
Update SubstrateCli to return String (#6550)
* Update SubstrateCli to return String * Add default implementation for executable_name() * Use display instead of PathBuf * Get file_name in default impl of executable_name * Remove String::from and use .into() * Use default impl for executable_name() * Use .as_str() and remove useless .to_string() * Update only sp-io when running companion build * Remove unneeded update of sp-io in CI Co-authored-by: Cecile Tonglet <cecile@parity.io>
This commit is contained in:
@@ -21,34 +21,30 @@ use crate::service;
|
||||
use sc_cli::{SubstrateCli, RuntimeVersion, Role, ChainSpec};
|
||||
|
||||
impl SubstrateCli for Cli {
|
||||
fn impl_name() -> &'static str {
|
||||
"Substrate Node"
|
||||
fn impl_name() -> String {
|
||||
"Substrate Node".into()
|
||||
}
|
||||
|
||||
fn impl_version() -> &'static str {
|
||||
env!("SUBSTRATE_CLI_IMPL_VERSION")
|
||||
fn impl_version() -> String {
|
||||
env!("SUBSTRATE_CLI_IMPL_VERSION").into()
|
||||
}
|
||||
|
||||
fn description() -> &'static str {
|
||||
env!("CARGO_PKG_DESCRIPTION")
|
||||
fn description() -> String {
|
||||
env!("CARGO_PKG_DESCRIPTION").into()
|
||||
}
|
||||
|
||||
fn author() -> &'static str {
|
||||
env!("CARGO_PKG_AUTHORS")
|
||||
fn author() -> String {
|
||||
env!("CARGO_PKG_AUTHORS").into()
|
||||
}
|
||||
|
||||
fn support_url() -> &'static str {
|
||||
"support.anonymous.an"
|
||||
fn support_url() -> String {
|
||||
"support.anonymous.an".into()
|
||||
}
|
||||
|
||||
fn copyright_start_year() -> i32 {
|
||||
2017
|
||||
}
|
||||
|
||||
fn executable_name() -> &'static str {
|
||||
env!("CARGO_PKG_NAME")
|
||||
}
|
||||
|
||||
fn load_spec(&self, id: &str) -> Result<Box<dyn sc_service::ChainSpec>, String> {
|
||||
Ok(match id {
|
||||
"dev" => Box::new(chain_spec::development_config()),
|
||||
|
||||
Reference in New Issue
Block a user