JsonHeaderParser: Make spec optional

This commit is contained in:
Matthias Beyer 2015-12-02 11:53:11 +01:00
parent 34cf5076f9
commit 500fb281a0

View file

@ -11,13 +11,13 @@ use super::super::parser::{FileHeaderParser, ParserError};
use super::super::file::{FileHeaderSpec, FileHeaderData}; use super::super::file::{FileHeaderSpec, FileHeaderData};
struct JsonHeaderParser<'a> { pub struct JsonHeaderParser {
spec: &'a FileHeaderSpec, spec: Option<FileHeaderSpec>,
} }
impl JsonHeaderParser { impl JsonHeaderParser {
fn new(spec: &'a FileHeaderSpec) -> JsonHeaderParser<'a> { pub fn new(spec: Option<FileHeaderSpec>) -> JsonHeaderParser {
JsonHeaderParser { JsonHeaderParser {
spec: spec spec: spec
} }