fix lifetime notation for Fragments
This commit is contained in:
parent
77ac89c5ba
commit
3c7cd6f0ec
@ -39,7 +39,7 @@ impl<B> Packet<side::Tx, B> {
|
|||||||
/// Fragment the payload into multiple packets
|
/// Fragment the payload into multiple packets
|
||||||
pub fn into_fragments<'a, P>(self, payload: P) -> Fragments<'a, P>
|
pub fn into_fragments<'a, P>(self, payload: P) -> Fragments<'a, P>
|
||||||
where
|
where
|
||||||
P: AsRef<[u8]>,
|
P: AsRef<[u8]> + 'a,
|
||||||
{
|
{
|
||||||
let Side::Tx(tx) = self.inner else { unreachable!() };
|
let Side::Tx(tx) = self.inner else { unreachable!() };
|
||||||
Fragments::new(tx.assoc_id, tx.pkt_id, tx.addr, tx.max_pkt_size, payload)
|
Fragments::new(tx.assoc_id, tx.pkt_id, tx.addr, tx.max_pkt_size, payload)
|
||||||
@ -182,10 +182,7 @@ impl<B> Debug for Packet<side::Rx, B> {
|
|||||||
|
|
||||||
/// Iterator over fragments of a packet
|
/// Iterator over fragments of a packet
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Fragments<'a, P>
|
pub struct Fragments<'a, P> {
|
||||||
where
|
|
||||||
P: 'a,
|
|
||||||
{
|
|
||||||
assoc_id: u16,
|
assoc_id: u16,
|
||||||
pkt_id: u16,
|
pkt_id: u16,
|
||||||
addr: Address,
|
addr: Address,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user