Move JsonHeaderParser::new() out of trait implementation
This commit is contained in:
parent
cf196b2492
commit
df18071d9a
1 changed files with 5 additions and 1 deletions
|
@ -15,7 +15,7 @@ struct JsonHeaderParser<'a> {
|
|||
spec: &'a FileHeaderSpec,
|
||||
}
|
||||
|
||||
impl<'a> FileHeaderParser<'a> for JsonHeaderParser<'a> {
|
||||
impl JsonHeaderParser {
|
||||
|
||||
fn new(spec: &'a FileHeaderSpec) -> JsonHeaderParser<'a> {
|
||||
JsonHeaderParser {
|
||||
|
@ -23,6 +23,10 @@ impl<'a> FileHeaderParser<'a> for JsonHeaderParser<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
impl FileHeaderParser for JsonHeaderParser {
|
||||
|
||||
fn read(&self, string: Option<String>)
|
||||
-> Result<FileHeaderData, ParserError>
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue