Bumping clippy & fixing warnings (#1823)

* Bumping clippy

* Fixing clippy warnings

* Cargo.lock (latest nightly?)
This commit is contained in:
Tomasz Drwięga
2016-08-03 19:01:48 +02:00
committed by Gav Wood
parent 531bc79edc
commit deceb5fd56
22 changed files with 194 additions and 48 deletions

View File

@@ -361,7 +361,7 @@ impl Configuration {
let mut buffer = String::new();
let mut node_file = try!(File::open(path).map_err(|e| format!("Error opening reserved nodes file: {}", e)));
try!(node_file.read_to_string(&mut buffer).map_err(|_| "Error reading reserved node file"));
let lines = buffer.lines().map(|s| s.trim().to_owned()).filter(|s| s.len() > 0).collect::<Vec<_>>();
let lines = buffer.lines().map(|s| s.trim().to_owned()).filter(|s| !s.is_empty()).collect::<Vec<_>>();
if let Some(invalid) = lines.iter().find(|s| !is_valid_node_url(s)) {
return Err(format!("Invalid node address format given for a boot node: {}", invalid));
}

View File

@@ -161,7 +161,7 @@ fn consolidate_database(
let mut db_config = DatabaseConfig {
max_open_files: 64,
cache_size: None,
compaction: config.compaction_profile.clone(),
compaction: config.compaction_profile,
columns: None,
wal: true,
};

View File

@@ -132,7 +132,7 @@ pub fn execute(cmd: RunCmd) -> Result<(), String> {
Some(id) => id,
None => spec.network_id(),
};
sync_config.fork_block = spec.fork_block().clone();
sync_config.fork_block = spec.fork_block();
// prepare account provider
let account_provider = Arc::new(try!(prepare_account_provider(&cmd.dirs, cmd.acc_conf)));