Run rustfmt on entire codebase

Signed-off-by: Paul Hauner <paul@paulhauner.com>
This commit is contained in:
Paul Hauner
2019-01-21 18:41:07 +11:00
parent ab502de8ec
commit 24a27891b8
14 changed files with 90 additions and 50 deletions

View File

@@ -137,9 +137,9 @@ impl From<BeaconNodeError> for Error {
mod tests {
use super::test_node::TestBeaconNode;
use super::*;
use crate::duties::EpochDuties;
use slot_clock::TestingSlotClock;
use types::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use crate::duties::EpochDuties;
// TODO: implement more thorough testing.
//

View File

@@ -16,7 +16,9 @@ impl<T: SlotClock, U: BeaconNode> BlockProducerService<T, U> {
Err(error) => {
error!(self.log, "Block producer poll error"; "error" => format!("{:?}", error))
}
Ok(BlockProducerPollOutcome::BlockProduced(slot)) => info!(self.log, "Produced block"; "slot" => slot),
Ok(BlockProducerPollOutcome::BlockProduced(slot)) => {
info!(self.log, "Produced block"; "slot" => slot)
}
Ok(BlockProducerPollOutcome::SlashableBlockNotProduced(slot)) => {
warn!(self.log, "Slashable block was not signed"; "slot" => slot)
}

View File

@@ -1,6 +1,6 @@
use super::traits::{BeaconNode, BeaconNodeError};
use types::BeaconBlock;
use std::sync::RwLock;
use types::BeaconBlock;
type ProduceResult = Result<Option<BeaconBlock>, BeaconNodeError>;
type PublishResult = Result<bool, BeaconNodeError>;
@@ -28,7 +28,7 @@ impl BeaconNode for TestBeaconNode {
*self.produce_input.write().unwrap() = Some(slot);
match *self.produce_result.read().unwrap() {
Some(ref r) => r.clone(),
None => panic!("TestBeaconNode: produce_result == None")
None => panic!("TestBeaconNode: produce_result == None"),
}
}
@@ -36,7 +36,7 @@ impl BeaconNode for TestBeaconNode {
*self.publish_input.write().unwrap() = Some(block);
match *self.publish_result.read().unwrap() {
Some(ref r) => r.clone(),
None => panic!("TestBeaconNode: publish_result == None")
None => panic!("TestBeaconNode: publish_result == None"),
}
}
}