Skip to content

Commit

Permalink
Detach serialise lifetime from inner slice lifetime
Browse files Browse the repository at this point in the history
  • Loading branch information
aumetra committed Jun 6, 2022
1 parent 74ea86b commit 682861e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ impl<'a> Su3<'a> {
/// The generator returned by this function exiting with `CustomError(1)` means that the version length is below 16 bytes.
/// If this error occurs you have to pad the bytes with null bytes.
#[must_use]
pub fn serialise<W>(&'a self) -> impl SerializeFn<W> + 'a
pub fn serialise<'w, W>(&'w self) -> impl SerializeFn<W> + 'w
where
W: Write + 'a,
W: Write + 'w,
{
ser::serialise(self)
}
Expand Down
2 changes: 1 addition & 1 deletion src/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use cookie_factory::{
GenError, SerializeFn,
};

pub fn serialise<'a, W>(su3: &'a Su3<'a>) -> impl SerializeFn<W> + 'a
pub fn serialise<'a, W>(su3: &'a Su3<'_>) -> impl SerializeFn<W> + 'a
where
W: Write + 'a,
{
Expand Down

0 comments on commit 682861e

Please sign in to comment.