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};
struct JsonHeaderParser<'a> {
spec: &'a FileHeaderSpec,
pub struct JsonHeaderParser {
spec: Option<FileHeaderSpec>,
}
impl JsonHeaderParser {
fn new(spec: &'a FileHeaderSpec) -> JsonHeaderParser<'a> {
pub fn new(spec: Option<FileHeaderSpec>) -> JsonHeaderParser {
JsonHeaderParser {
spec: spec
}