parser: Remove livetimes

This commit is contained in:
Matthias Beyer 2015-12-02 11:28:21 +01:00
parent 2e3db902e0
commit 2a468059aa

View file

@ -73,9 +73,7 @@ impl Display for ParserError {
} }
pub trait FileHeaderParser : Sized {
pub trait FileHeaderParser<'a> : Sized {
fn new(spec: &'a FileHeaderSpec) -> Self;
fn read(&self, string: Option<String>) -> Result<FileHeaderData, ParserError>; fn read(&self, string: Option<String>) -> Result<FileHeaderData, ParserError>;
fn write(&self, data: &FileHeaderData) -> Result<String, ParserError>; fn write(&self, data: &FileHeaderData) -> Result<String, ParserError>;
} }
@ -87,11 +85,11 @@ pub struct Parser<HP>
headerp : HP, headerp : HP,
} }
impl<'a, HP> Parser<HP> where impl<HP> Parser<HP> where
HP: FileHeaderParser<'a>, HP: FileHeaderParser,
{ {
fn new(headerp: HP) -> Parser<HP> { pub fn new(headerp: HP) -> Parser<HP> {
Parser { Parser {
headerp: headerp, headerp: headerp,
} }