From 545d9d611614d90d46197336b9aebb049347f962 Mon Sep 17 00:00:00 2001 From: yeastplume Date: Thu, 18 Oct 2018 11:40:58 +0100 Subject: [PATCH] t4 merge - rustfmt on entire tree --- pool/src/lib.rs | 5 +++-- src/bin/tui/table.rs | 9 +++++++-- store/tests/pmmr.rs | 17 ++++++++++------- store/tests/rm_log_perf.rs | 4 ++-- store/tests/utxo_set_perf.rs | 4 ++-- 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/pool/src/lib.rs b/pool/src/lib.rs index d7cf1d5c..851419ed 100644 --- a/pool/src/lib.rs +++ b/pool/src/lib.rs @@ -38,5 +38,6 @@ pub mod transaction_pool; pub mod types; pub use transaction_pool::TransactionPool; -pub use types::{BlockChain, DandelionConfig, PoolAdapter, PoolConfig, PoolEntryState, PoolError, - TxSource}; +pub use types::{ + BlockChain, DandelionConfig, PoolAdapter, PoolConfig, PoolEntryState, PoolError, TxSource, +}; diff --git a/src/bin/tui/table.rs b/src/bin/tui/table.rs index f9f607e2..5291905d 100644 --- a/src/bin/tui/table.rs +++ b/src/bin/tui/table.rs @@ -42,8 +42,13 @@ //! A basic table view implementation for [cursive](https://crates.io/crates/cursive). #![deny( - missing_docs, missing_copy_implementations, trivial_casts, trivial_numeric_casts, unsafe_code, - unused_import_braces, unused_qualifications + missing_docs, + missing_copy_implementations, + trivial_casts, + trivial_numeric_casts, + unsafe_code, + unused_import_braces, + unused_qualifications )] // Crate Dependencies --------------------------------------------------------- diff --git a/store/tests/pmmr.rs b/store/tests/pmmr.rs index 9def3375..ebc696d6 100644 --- a/store/tests/pmmr.rs +++ b/store/tests/pmmr.rs @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +extern crate chrono; extern crate croaring; extern crate env_logger; extern crate grin_core as core; extern crate grin_store as store; -extern crate chrono; use std::fs; -use chrono::prelude::{Utc}; +use chrono::prelude::Utc; use croaring::Bitmap; use core::core::pmmr::{Backend, PMMR}; @@ -355,8 +355,7 @@ fn pmmr_rewind() { // rewind and check the roots still match { let mut pmmr: PMMR = PMMR::at(&mut backend, mmr_size); - pmmr.rewind(9, &Bitmap::of(&vec![11, 12, 16])) - .unwrap(); + pmmr.rewind(9, &Bitmap::of(&vec![11, 12, 16])).unwrap(); assert_eq!(pmmr.unpruned_size(), 10); // assert_eq!(pmmr.root(), root2); @@ -400,8 +399,7 @@ fn pmmr_rewind() { { let mut pmmr: PMMR = PMMR::at(&mut backend, 10); - pmmr.rewind(5, &Bitmap::create()) - .unwrap(); + pmmr.rewind(5, &Bitmap::create()).unwrap(); assert_eq!(pmmr.root(), root1); } backend.sync().unwrap(); @@ -724,7 +722,12 @@ fn setup(tag: &str) -> (String, Vec) { Err(e) => println!("env logger already initialized: {:?}", e), }; let t = Utc::now(); - let data_dir = format!("./target/tmp/{}.{}-{}", t.timestamp(), t.timestamp_subsec_nanos(), tag); + let data_dir = format!( + "./target/tmp/{}.{}-{}", + t.timestamp(), + t.timestamp_subsec_nanos(), + tag + ); fs::create_dir_all(data_dir.clone()).unwrap(); let mut elems = vec![]; diff --git a/store/tests/rm_log_perf.rs b/store/tests/rm_log_perf.rs index 25797c10..f64cd986 100644 --- a/store/tests/rm_log_perf.rs +++ b/store/tests/rm_log_perf.rs @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +extern crate chrono; extern crate croaring; extern crate env_logger; extern crate grin_core as core; extern crate grin_store as store; -extern crate chrono; +use chrono::prelude::Utc; use std::fs; use std::time::{Duration, Instant}; -use chrono::prelude::{Utc}; use store::rm_log::RemoveLog; diff --git a/store/tests/utxo_set_perf.rs b/store/tests/utxo_set_perf.rs index 7543c60f..2b0b1b57 100644 --- a/store/tests/utxo_set_perf.rs +++ b/store/tests/utxo_set_perf.rs @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +extern crate chrono; extern crate croaring; extern crate env_logger; extern crate grin_core as core; extern crate grin_store as store; -extern crate chrono; +use chrono::prelude::Utc; use std::fs; use std::time::{Duration, Instant}; -use chrono::prelude::{Utc}; use croaring::Bitmap;