From d10ade1963321d65599fc51b4157365d87bf970b Mon Sep 17 00:00:00 2001 From: Guanqun Lu Date: Fri, 19 May 2017 10:12:20 -0500 Subject: [PATCH] remove the deprecated options in rustfmt.toml (#5616) * remove the deprecated options in rustfmt.toml * add chain_one_line_max * fix two issues spot by rustfmt --- parity/account.rs | 2 +- parity/stratum.rs | 4 ++-- rustfmt.toml | 16 +++++++--------- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/parity/account.rs b/parity/account.rs index 217bb3401..2f177adf1 100644 --- a/parity/account.rs +++ b/parity/account.rs @@ -80,7 +80,7 @@ fn keys_dir(path: String, spec: SpecType) -> Result { fn secret_store(dir: Box, iterations: Option) -> Result { match iterations { Some(i) => EthStore::open_with_iterations(dir, i), - _ => EthStore::open(dir) + _ => EthStore::open(dir) }.map_err(|e| format!("Could not open keys store: {}", e)) } diff --git a/parity/stratum.rs b/parity/stratum.rs index 9389764bd..043ba5062 100644 --- a/parity/stratum.rs +++ b/parity/stratum.rs @@ -65,10 +65,10 @@ pub fn main() { StratumServer::start( &SocketAddr::new( IpAddr::from_str(&service_config.listen_addr) - .unwrap_or_else(|e| + .unwrap_or_else(|e| { println!("Fatal: invalid listen address: '{}' ({:?})", &service_config.listen_addr, e); std::process::exit(1) - ), + }), service_config.port, ), job_dispatcher.service().clone(), diff --git a/rustfmt.toml b/rustfmt.toml index aa66bf467..b1dd4575b 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,17 +1,15 @@ verbose=false max_width=1000 -ideal_width=1000 -tabs_spaces=4 +comment_width=1000 +tab_spaces=4 fn_call_width=1000 struct_lit_width=32 -fn_arg_indent="Tabbed" -single_line_if_else=true -where_indent="Visual" -where_trailing_comma=true -chain_base_indent="Inherit" -chain_indent="Inherit" +fn_call_style="Visual" +single_line_if_else_max_width=100 +trailing_comma="Vertical" +chain_indent="Visual" +chain_one_line_max=100 reorder_imports=true format_strings=false -chain_overflow_last=false hard_tabs=true wrap_match_arms=false