Skip to content

smoltcp::Device implementation can be for EthernetDMA instead of &mut EthernetDMAΒ #86

@datdenkikniet

Description

@datdenkikniet

The current implementation still has the following signature:

impl<'a, 'rx, 'tx> smoltcp::Device for &'a mut EthernetDMA<'rx, 'tx> {}

However, the 'a lifetime is completely unused. We could change the impl to

impl<'rx, 'tx> smoltcp::Device for EthernetDMA<'rx, 'tx> {}

We should investigate whether this is still necessary (unlikely), or if it is just an artifact from how the Device trait worked in smoltcp 0.8 and older (likely).

Removing that lifetime and impl-ing directly for EthernetDMA would also remove the current oddness w.r.t. requiring that an &mut &mut EthernetDMA is passed to smoltcp functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions