Lifetime simplification reflecting probably-better understanding of them
This commit is contained in:
parent
724eabf326
commit
bebe593c30
1 changed files with 3 additions and 3 deletions
|
@ -218,11 +218,11 @@ pub struct Ebml<Source> {
|
|||
pub source: Source
|
||||
}
|
||||
|
||||
pub trait FromEbml<'b>: Sized {
|
||||
pub trait FromEbml<'a>: Sized {
|
||||
fn should_unwrap(element_id: u64) -> bool;
|
||||
fn decode(element_id: u64, bytes: &'b[u8]) -> Result<Self, Error>;
|
||||
fn decode(element_id: u64, bytes: &'a[u8]) -> Result<Self, Error>;
|
||||
|
||||
fn decode_element<'a: 'b>(bytes: &'a[u8]) -> Result<Option<(Self, usize)>, Error> {
|
||||
fn decode_element(bytes: &'a[u8]) -> Result<Option<(Self, usize)>, Error> {
|
||||
match decode_tag(bytes) {
|
||||
Ok(None) => Ok(None),
|
||||
Err(err) => Err(err),
|
||||
|
|
Loading…
Reference in a new issue