parser: Remove livetimes
This commit is contained in:
parent
2e3db902e0
commit
2a468059aa
1 changed files with 4 additions and 6 deletions
|
@ -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,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue