diff --git a/ethcore/types/src/data_format.rs b/ethcore/types/src/data_format.rs index 8cfe5cf2be3..418ecee0ead 100644 --- a/ethcore/types/src/data_format.rs +++ b/ethcore/types/src/data_format.rs @@ -20,24 +20,26 @@ use std::str::FromStr; /// Format for importing/exporting blocks #[derive(Debug, PartialEq)] pub enum DataFormat { - Hex, - Binary, + /// Hexadeicmal format + Hex, + /// Binary format + Binary, } impl Default for DataFormat { - fn default() -> Self { - DataFormat::Binary - } + fn default() -> Self { + DataFormat::Binary + } } impl FromStr for DataFormat { - type Err = String; - - fn from_str(s: &str) -> Result { - match s { - "binary" | "bin" => Ok(DataFormat::Binary), - "hex" => Ok(DataFormat::Hex), - x => Err(format!("Invalid format: {}", x)) - } - } + type Err = String; + + fn from_str(s: &str) -> Result { + match s { + "binary" | "bin" => Ok(DataFormat::Binary), + "hex" => Ok(DataFormat::Hex), + x => Err(format!("Invalid format: {}", x)) + } + } }