Move JsonHeaderParser::new() out of trait implementation

This commit is contained in:
Matthias Beyer 2015-12-02 11:51:50 +01:00
parent cf196b2492
commit df18071d9a

View file

@ -15,7 +15,7 @@ struct JsonHeaderParser<'a> {
spec: &'a FileHeaderSpec, spec: &'a FileHeaderSpec,
} }
impl<'a> FileHeaderParser<'a> for JsonHeaderParser<'a> { impl JsonHeaderParser {
fn new(spec: &'a FileHeaderSpec) -> JsonHeaderParser<'a> { fn new(spec: &'a FileHeaderSpec) -> JsonHeaderParser<'a> {
JsonHeaderParser { JsonHeaderParser {
@ -23,6 +23,10 @@ impl<'a> FileHeaderParser<'a> for JsonHeaderParser<'a> {
} }
} }
}
impl FileHeaderParser for JsonHeaderParser {
fn read(&self, string: Option<String>) fn read(&self, string: Option<String>)
-> Result<FileHeaderData, ParserError> -> Result<FileHeaderData, ParserError>
{ {