Disable long lines formatting (#939)

This commit is contained in:
Tomasz Drwięga 2016-04-13 00:06:02 +02:00 committed by Gav Wood
parent fbc28ce493
commit 3ce2374aeb
3 changed files with 37 additions and 37 deletions

View File

@ -27,7 +27,7 @@ use std::ptr;
use sha3;
use std::slice;
use std::path::PathBuf;
use std::io::{Read, Write, self};
use std::io::{self, Read, Write};
use std::fs::{self, File};
pub const ETHASH_EPOCH_LENGTH: u64 = 30000;
@ -51,7 +51,7 @@ pub struct ProofOfWork {
/// Difficulty boundary
pub value: H256,
/// Mix
pub mix_hash: H256
pub mix_hash: H256,
}
struct Node {
@ -148,14 +148,16 @@ impl Light {
pub struct SeedHashCompute {
prev_epoch: Cell<u64>,
prev_seedhash: Cell<H256>
prev_seedhash: Cell<H256>,
}
impl SeedHashCompute {
#[inline]
pub fn new() -> SeedHashCompute {
SeedHashCompute { prev_epoch: Cell::new(0), prev_seedhash: Cell::new([0u8; 32]) }
SeedHashCompute {
prev_epoch: Cell::new(0),
prev_seedhash: Cell::new([0u8; 32]),
}
}
#[inline]
@ -370,9 +372,7 @@ fn to_hex(bytes: &[u8]) -> String {
v.push(CHARS[(byte & 0xf) as usize]);
}
unsafe {
String::from_utf8_unchecked(v)
}
unsafe { String::from_utf8_unchecked(v) }
}
#[test]

View File

@ -24,7 +24,7 @@ mod compute;
use std::mem;
use compute::Light;
pub use compute::{SeedHashCompute, quick_get_difficulty, H256, ProofOfWork, ETHASH_EPOCH_LENGTH};
pub use compute::{ETHASH_EPOCH_LENGTH, H256, ProofOfWork, SeedHashCompute, quick_get_difficulty};
use std::sync::{Arc, Mutex};
@ -76,7 +76,7 @@ impl EthashManager {
lights.recent.clone()
}
_ => None,
}
},
};
match light {
None => {
@ -95,7 +95,7 @@ impl EthashManager {
lights.prev = mem::replace(&mut lights.recent, Some(light.clone()));
light
}
Some(light) => light
Some(light) => light,
}
};
light.compute(header_hash, nonce)

View File

@ -1,8 +1,8 @@
verbose=false
max_width=150
ideal_width=120
max_width=1000
ideal_width=1000
tabs_spaces=4
fn_call_width=100
fn_call_width=1000
fn_arg_indent="Tabbed"
single_line_if_else=true
where_indent="Visual"