commit
2c2e8ef154
@ -137,6 +137,7 @@ impl InstructionInfo {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(rustfmt, rustfmt_skip)]
|
||||
/// Return details about specific instruction
|
||||
pub fn get_info (instruction: Instruction) -> InstructionInfo {
|
||||
match instruction {
|
||||
|
14
fmt.sh
Executable file
14
fmt.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
RUSTFMT="rustfmt --write-mode overwrite"
|
||||
|
||||
$RUSTFMT ./ethash/src/lib.rs
|
||||
$RUSTFMT ./ethcore/src/lib.rs
|
||||
$RUSTFMT ./evmjit/src/lib.rs
|
||||
$RUSTFMT ./json/src/lib.rs
|
||||
$RUSTFMT ./miner/src/lib.rs
|
||||
$RUSTFMT ./parity/main.rs
|
||||
$RUSTFMT ./rpc/src/lib.rs
|
||||
$RUSTFMT ./sync/src/lib.rs
|
||||
$RUSTFMT ./util/src/lib.rs
|
||||
|
14
rustfmt.toml
Normal file
14
rustfmt.toml
Normal file
@ -0,0 +1,14 @@
|
||||
verbose=false
|
||||
max_width=150
|
||||
ideal_width=120
|
||||
tabs_spaces=4
|
||||
fn_call_width=100
|
||||
single_line_if_else=true
|
||||
where_indent="Visual"
|
||||
where_trailing_comma=true
|
||||
chain_base_indent="Inherit"
|
||||
chain_indent="Tabbed"
|
||||
reorder_imports=true
|
||||
format_strings=false
|
||||
hard_tabs=true
|
||||
wrap_match_arms=false
|
@ -1 +0,0 @@
|
||||
hard_tabs = true
|
@ -208,7 +208,7 @@ pub mod ec {
|
||||
match context.verify(&try!(Message::from_slice(&message)), &sig, &publ) {
|
||||
Ok(_) => Ok(true),
|
||||
Err(Error::IncorrectSignature) => Ok(false),
|
||||
Err(x) => Err(<CryptoError as From<Error>>::from(x))
|
||||
Err(x) => Err(CryptoError::from(x))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,7 @@ impl<'a, 'view> Iterator for RlpIterator<'a, 'view> {
|
||||
|
||||
fn next(&mut self) -> Option<Rlp<'a>> {
|
||||
let index = self.index;
|
||||
let result = self.rlp.rlp.at(index).ok().map(| iter | { From::from(iter) });
|
||||
let result = self.rlp.rlp.at(index).ok().map(From::from);
|
||||
self.index += 1;
|
||||
result
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user