From df18071d9a02c575c3ec5fe345621c6216cad788 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Wed, 2 Dec 2015 11:51:50 +0100 Subject: [PATCH] Move JsonHeaderParser::new() out of trait implementation --- src/storage/json/parser.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/storage/json/parser.rs b/src/storage/json/parser.rs index e0981a9d..fc663303 100644 --- a/src/storage/json/parser.rs +++ b/src/storage/json/parser.rs @@ -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) -> Result {