Skip to content

Commit 682861e

Browse files
committed
Detach serialise lifetime from inner slice lifetime
1 parent 74ea86b commit 682861e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@ impl<'a> Su3<'a> {
218218
/// The generator returned by this function exiting with `CustomError(1)` means that the version length is below 16 bytes.
219219
/// If this error occurs you have to pad the bytes with null bytes.
220220
#[must_use]
221-
pub fn serialise<W>(&'a self) -> impl SerializeFn<W> + 'a
221+
pub fn serialise<'w, W>(&'w self) -> impl SerializeFn<W> + 'w
222222
where
223-
W: Write + 'a,
223+
W: Write + 'w,
224224
{
225225
ser::serialise(self)
226226
}

src/ser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use cookie_factory::{
99
GenError, SerializeFn,
1010
};
1111

12-
pub fn serialise<'a, W>(su3: &'a Su3<'a>) -> impl SerializeFn<W> + 'a
12+
pub fn serialise<'a, W>(su3: &'a Su3<'_>) -> impl SerializeFn<W> + 'a
1313
where
1414
W: Write + 'a,
1515
{

0 commit comments

Comments
 (0)