From 775cb9619cd31028e801371225c58f6543c01472 Mon Sep 17 00:00:00 2001 From: piaoliu <441594700@qq.com> Date: Wed, 23 Jan 2019 11:12:47 +0800 Subject: [PATCH] bump to 0.19.4 --- cita-cli/Cargo.toml | 2 +- cita-cli/src/interactive.rs | 2 +- cita-cli/src/main.rs | 19 ++++++++++++++++++- cita-tool/src/abi.rs | 2 +- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/cita-cli/Cargo.toml b/cita-cli/Cargo.toml index a519b66..8dd992d 100644 --- a/cita-cli/Cargo.toml +++ b/cita-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cita-cli" -version = "0.19.3" +version = "0.19.4" authors = ["piaoliu <441594700@qq.com>", "Qian Linfeng "] build = "build.rs" edition = "2018" diff --git a/cita-cli/src/interactive.rs b/cita-cli/src/interactive.rs index a2a6fd9..7dca82f 100644 --- a/cita-cli/src/interactive.rs +++ b/cita-cli/src/interactive.rs @@ -819,7 +819,7 @@ mod test { fn test_re() { fn capture(regex: &Regex, line: &str) -> String { let replaced = regex.replace_all(line, |caps: &Captures| { - format!("{}", caps.name("key").unwrap().as_str()) + caps.name("key").unwrap().as_str().to_string() }); replaced.into_owned() } diff --git a/cita-cli/src/main.rs b/cita-cli/src/main.rs index 2867956..9c5e487 100644 --- a/cita-cli/src/main.rs +++ b/cita-cli/src/main.rs @@ -30,7 +30,12 @@ const DEFAULT_JSONRPC_URL: &str = "http://127.0.0.1:1337"; fn main() { dotenv().ok(); - let version = format!("{}+{}", crate_version!(), get_commit_id()); + let version = format!( + "{}+{}, {}", + crate_version!(), + get_commit_id(), + feature_version() + ); let mut env_map: HashMap = HashMap::from_iter(env::vars()); let default_jsonrpc_url = env_map @@ -72,3 +77,15 @@ fn main() { process::exit(1); } } + +fn feature_version() -> String { + if cfg!(feature = "tls") && cfg!(feature = "ed25519") { + "support tls, ed25519".to_owned() + } else if cfg!(feature = "tls") { + "support tls".to_owned() + } else if cfg!(feature = "ed25519") { + "support ed25519".to_owned() + } else { + "no other support".to_owned() + } +} diff --git a/cita-tool/src/abi.rs b/cita-tool/src/abi.rs index d17ff51..2d66479 100644 --- a/cita-tool/src/abi.rs +++ b/cita-tool/src/abi.rs @@ -221,7 +221,7 @@ pub fn decode_logs( .map_err(|e| ToolError::Abi(format!("{}", e)))?; let topics: Vec = topics - .into_iter() + .iter() .map(|t| t.parse()) .collect::>() .map_err(|e| ToolError::Abi(format!("{}", e)))?;