Skip to content

Commit

Permalink
bump to 0.19.4
Browse files Browse the repository at this point in the history
  • Loading branch information
driftluo committed Jan 23, 2019
1 parent e83284f commit 775cb96
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cita-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cita-cli"
version = "0.19.3"
version = "0.19.4"
authors = ["piaoliu <[email protected]>", "Qian Linfeng <[email protected]>"]
build = "build.rs"
edition = "2018"
Expand Down
2 changes: 1 addition & 1 deletion cita-cli/src/interactive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
19 changes: 18 additions & 1 deletion cita-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, String> = HashMap::from_iter(env::vars());
let default_jsonrpc_url = env_map
Expand Down Expand Up @@ -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()
}
}
2 changes: 1 addition & 1 deletion cita-tool/src/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ pub fn decode_logs(
.map_err(|e| ToolError::Abi(format!("{}", e)))?;

let topics: Vec<Hash> = topics
.into_iter()
.iter()
.map(|t| t.parse())
.collect::<Result<_, _>>()
.map_err(|e| ToolError::Abi(format!("{}", e)))?;
Expand Down

0 comments on commit 775cb96

Please sign in to comment.