@@ -21,11 +21,11 @@ mod binary_quantized_test;
2121pub trait UnalignedVectorCodec : std:: borrow:: ToOwned + Sized {
2222 /// Creates an unaligned vector from a slice of bytes.
2323 /// Don't allocate.
24- fn from_bytes ( bytes : & [ u8 ] ) -> Result < Cow < UnalignedVector < Self > > , SizeMismatch > ;
24+ fn from_bytes ( bytes : & [ u8 ] ) -> Result < Cow < ' _ , UnalignedVector < Self > > , SizeMismatch > ;
2525
2626 /// Creates an unaligned vector from a slice of f32.
2727 /// May allocate depending on the codec.
28- fn from_slice ( slice : & [ f32 ] ) -> Cow < UnalignedVector < Self > > ;
28+ fn from_slice ( slice : & [ f32 ] ) -> Cow < ' _ , UnalignedVector < Self > > ;
2929
3030 /// Creates an unaligned slice of f32 wrapper from a slice of f32.
3131 /// The slice is already known to be of the right length.
@@ -62,13 +62,13 @@ pub struct UnalignedVector<Codec: UnalignedVectorCodec> {
6262impl < Codec : UnalignedVectorCodec > UnalignedVector < Codec > {
6363 /// Creates an unaligned vector from a slice of bytes.
6464 /// Don't allocate.
65- pub fn from_bytes ( bytes : & [ u8 ] ) -> Result < Cow < UnalignedVector < Codec > > , SizeMismatch > {
65+ pub fn from_bytes ( bytes : & [ u8 ] ) -> Result < Cow < ' _ , UnalignedVector < Codec > > , SizeMismatch > {
6666 Codec :: from_bytes ( bytes)
6767 }
6868
6969 /// Creates an unaligned vector from a slice of f32.
7070 /// May allocate depending on the codec.
71- pub fn from_slice ( slice : & [ f32 ] ) -> Cow < UnalignedVector < Codec > > {
71+ pub fn from_slice ( slice : & [ f32 ] ) -> Cow < ' _ , UnalignedVector < Codec > > {
7272 Codec :: from_slice ( slice)
7373 }
7474
0 commit comments