From 0c2f00277490af293f5715931bb0b4acafe63995 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Fri, 20 Dec 2019 19:52:12 -0800 Subject: [PATCH] cargo fmt --- ledger-tool/src/main.rs | 42 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/ledger-tool/src/main.rs b/ledger-tool/src/main.rs index 74b095f096..48493fc036 100644 --- a/ledger-tool/src/main.rs +++ b/ledger-tool/src/main.rs @@ -727,32 +727,30 @@ fn main() { } }); } - ("bounds", Some(args_matches)) => { - match blocktree.slot_meta_iterator(0) { - Ok(metas) => { - let all = args_matches.is_present("all"); + ("bounds", Some(args_matches)) => match blocktree.slot_meta_iterator(0) { + Ok(metas) => { + let all = args_matches.is_present("all"); - println!("Collecting Ledger information..."); - let slots: Vec<_> = metas.map(|(slot, _)| slot).collect(); - if slots.is_empty() { - println!("Ledger is empty. No slots found."); - } else { - let first = slots.first().unwrap(); - let last = slots.last().unwrap_or_else(|| first); - if first != last { - println!("Ledger contains data from slots {:?} to {:?}", first, last); - if all { - println!("Non-empty slots: {:?}", slots); - } - } else { - println!("Ledger only contains some data for slot {:?}", first); + println!("Collecting Ledger information..."); + let slots: Vec<_> = metas.map(|(slot, _)| slot).collect(); + if slots.is_empty() { + println!("Ledger is empty. No slots found."); + } else { + let first = slots.first().unwrap(); + let last = slots.last().unwrap_or_else(|| first); + if first != last { + println!("Ledger contains data from slots {:?} to {:?}", first, last); + if all { + println!("Non-empty slots: {:?}", slots); } + } else { + println!("Ledger only contains some data for slot {:?}", first); } } - Err(err) => { - eprintln!("Unable to read the Ledger: {:?}", err); - exit(1); - } + } + Err(err) => { + eprintln!("Unable to read the Ledger: {:?}", err); + exit(1); } }, ("", _) => {