JsonHeaderParser: Make spec optional
This commit is contained in:
parent
34cf5076f9
commit
500fb281a0
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue