Whitespace fixes.

This commit is contained in:
Gav Wood 2016-01-05 19:12:19 +01:00
parent dabb90bf40
commit 6585910c2a

View File

@ -20,8 +20,6 @@ use null_engine::NullEngine;
use denominations::*; use denominations::*;
use header::*; use header::*;
// TODO: need a JSON->cost closure converter.
/// Converts file from base64 gzipped bytes to json /// Converts file from base64 gzipped bytes to json
pub fn base_to_json(source: &[u8]) -> Json { pub fn base_to_json(source: &[u8]) -> Json {
// there is probably no need to store genesis in based64 gzip, // there is probably no need to store genesis in based64 gzip,
@ -53,9 +51,9 @@ pub fn json_to_rlp(json: &Json) -> Bytes {
/// Convert JSON to a string->RLP map. /// Convert JSON to a string->RLP map.
pub fn json_to_rlp_map(json: &Json) -> HashMap<String, Bytes> { pub fn json_to_rlp_map(json: &Json) -> HashMap<String, Bytes> {
json.as_object().unwrap().iter().map(|(k, v)| (k, json_to_rlp(v))).fold(HashMap::new(), |mut acc, kv| { json.as_object().unwrap().iter().map(|(k, v)| (k, json_to_rlp(v))).fold(HashMap::new(), |mut acc, kv| {
acc.insert(kv.0.clone(), kv.1); acc.insert(kv.0.clone(), kv.1);
acc acc
}) })
} }
/// Parameters for a block chain; includes both those intrinsic to the design of the /// Parameters for a block chain; includes both those intrinsic to the design of the