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
This commit is contained in:
Guanqun Lu 2017-05-19 10:12:20 -05:00 committed by Gav Wood
parent 84cab18120
commit d10ade1963
3 changed files with 10 additions and 12 deletions

View File

@ -80,7 +80,7 @@ fn keys_dir(path: String, spec: SpecType) -> Result<RootDiskDirectory, String> {
fn secret_store(dir: Box<RootDiskDirectory>, iterations: Option<u32>) -> Result<EthStore, String> {
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))
}

View File

@ -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(),

View File

@ -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