Skip to content

Commit

Permalink
Merge pull request #129 from leeyr338/bump-to-20-02
Browse files Browse the repository at this point in the history
bump to 20.2.0
  • Loading branch information
rink1969 authored Feb 10, 2020
2 parents c494b88 + f3eeded commit 89132d0
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
language: rust
rust:
- stable

before_script:
- rustup component add rustfmt-preview
- rustup component add clippy
script:
# For speed up the CI process
# See: https://docs.travis-ci.com/user/build-stages/#Data-persistence-between-stages-and-jobs
- .ci-script/clippy_test.sh
- cargo fmt -- --check && cargo test --all && cargo test --no-default-features --features openssl --all
- cargo fmt -- --check && cargo test --all
- cd cita-cli && cargo test --no-default-features --features openssl
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.7"
version = "20.2.0"
authors = ["piaoliu <[email protected]>", "Qian Linfeng <[email protected]>"]
build = "build.rs"
edition = "2018"
Expand Down
2 changes: 1 addition & 1 deletion cita-cli/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub fn get_commit_describe() -> Option<String> {
.and_then(|r| {
String::from_utf8(r.stdout).ok().map(|s| {
s.trim()
.splitn(2, "-")
.splitn(2, '-')
.collect::<Vec<&str>>()
.pop()
.unwrap_or_default()
Expand Down
6 changes: 2 additions & 4 deletions cita-cli/src/interactive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub fn start(url: &str, client: &Client) -> io::Result<()> {
config.set_save_private(configs["save_private"].as_bool().unwrap_or(false));
}

let mut env_file = cita_cli_dir.clone();
let mut env_file = cita_cli_dir;
env_file.push("env_vars");
if env_file.as_path().exists() {
let file = fs::File::open(&env_file)?;
Expand Down Expand Up @@ -364,7 +364,7 @@ impl<'a, 'b> CitaCompleter<'a, 'b> {
.map(|aliases| {
aliases
.iter()
.map(|(alias, _)| (alias.to_string(), alias.to_string()))
.map(|(alias, _)| ((*alias).to_string(), (*alias).to_string()))
.collect::<Vec<(String, String)>>()
})
.unwrap_or_else(|| vec![]),
Expand Down Expand Up @@ -443,7 +443,6 @@ impl<'a, 'b> Completer for CitaCompleter<'a, 'b> {

if word_lower.is_empty() {
let pairs = tmp_pair
.clone()
.into_iter()
.map(|(display, replacement)| Pair {
display,
Expand All @@ -467,7 +466,6 @@ impl<'a, 'b> Completer for CitaCompleter<'a, 'b> {
.any(|ref mut x| x.replacement.to_lowercase().contains(&word_lower))
{
let pairs = tmp_pair
.clone()
.into_iter()
.filter(|(_, replacement)| replacement.to_lowercase().contains(&word_lower))
.map(|(display, replacement)| Pair {
Expand Down
16 changes: 8 additions & 8 deletions cita-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,19 @@ fn main() {
let client = Client::new();

if let Err(err) = match matches.subcommand() {
("rpc", Some(m)) => rpc_processor(m, &printer, &mut config, client.clone()),
("rpc", Some(m)) => rpc_processor(m, &printer, &mut config, client),
("ethabi", Some(m)) => abi_processor(m, &printer, &config),
("key", Some(m)) => key_processor(m, &printer, &config),
("scm", Some(m)) => contract_processor(m, &printer, &mut config, client.clone()),
("transfer", Some(m)) => transfer_processor(m, &printer, &mut config, client.clone()),
("store", Some(m)) => store_processor(m, &printer, &mut config, client.clone()),
("amend", Some(m)) => amend_processor(m, &printer, &mut config, client.clone()),
("scm", Some(m)) => contract_processor(m, &printer, &mut config, client),
("transfer", Some(m)) => transfer_processor(m, &printer, &mut config, client),
("store", Some(m)) => store_processor(m, &printer, &mut config, client),
("amend", Some(m)) => amend_processor(m, &printer, &mut config, client),
("search", Some(m)) => {
search_processor(&parser, m);
Ok(())
}
("tx", Some(m)) => tx_processor(m, &printer, &mut config, client.clone()),
("benchmark", Some(m)) => benchmark_processor(m, &printer, &config, client.clone()),
("tx", Some(m)) => tx_processor(m, &printer, &mut config, client),
("benchmark", Some(m)) => benchmark_processor(m, &printer, &config, client),
("completions", Some(m)) => {
completion_processor(&mut parser, m);
Ok(())
Expand All @@ -73,7 +73,7 @@ fn main() {
Ok(())
}
} {
printer.eprintln(&Rc::new(err.to_string()), true);
printer.eprintln(&Rc::new(err), true);
process::exit(1);
}
}
Expand Down
2 changes: 1 addition & 1 deletion tool-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub fn contract(input: TokenStream) -> TokenStream {
// parse str to LitStr
let path = syn::LitStr::new(&path, proc_macro2::Span::call_site());
// parse str to Ident
let trait_name = syn::Ident::new(&trait_name.to_string(), proc_macro2::Span::call_site());
let trait_name = syn::Ident::new(&trait_name, proc_macro2::Span::call_site());
let address = syn::LitStr::new(&address, proc_macro2::Span::call_site());

let output = if let syn::Data::Struct(data) = input.data {
Expand Down

0 comments on commit 89132d0

Please sign in to comment.