Skip to content

Replace for loop with [u8]::fill method #38

@joshlf

Description

@joshlf

In map_zeroed and map_prefix_tuple_zeroed, we zero a byte slice by doing:

for b in lv.0.iter_mut() {
    *b = 0;
}

Instead, we could use [u8]::fill:

lv.0.fill(0);

Metadata

Metadata

Assignees

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