Skip to content

Make Peripherals::steal() zero cost #356

Open
@Dirbaio

Description

@Dirbaio

Peripherals::steal() has a write to a static mut:

TAKEN = true;

I expected it to be zero-cost, just constructing and returning the Peripherals which is a noop since it is ZST. This was a bit surprising.

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