JulianSchmid / etherparse

A rust library for parsing ethernet & ethernet using protocols.
Apache License 2.0
286 stars 54 forks source link

Use `slice::iter` instead of `into_iter` to avoid future breakage #7

Closed LukasKalbertodt closed 4 years ago

LukasKalbertodt commented 4 years ago

an_array.into_iter() currently just works because of the autoref feature, which then calls <[T] as IntoIterator>::into_iter. But in the future, arrays will implement IntoIterator, too. In order to avoid problems in the future, the call is replaced by iter() which is shorter and more explicit.

A crater run showed that your crate is affected by a potential future change. See https://github.com/rust-lang/rust/pull/65819 for more information.

codecov[bot] commented 4 years ago

Codecov Report

Merging #7 into master will decrease coverage by 0.03%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #7      +/-   ##
==========================================
- Coverage   99.41%   99.37%   -0.04%     
==========================================
  Files          27       27              
  Lines        5157     5159       +2     
==========================================
  Hits         5127     5127              
- Misses         30       32       +2
Flag Coverage Δ
#unittests 99.32% <100%> (-0.04%) :arrow_down:
#whitebox_unitttests 84% <ø> (+12%) :arrow_up:
Impacted Files Coverage Δ
src/internet/ipv4.rs 100% <100%> (+0.3%) :arrow_up:
src/internet/ipv6.rs 98.98% <0%> (-1.02%) :arrow_down:
src/packet_builder.rs 98.31% <0%> (-0.84%) :arrow_down:
tests/unit-tests.rs 98.43% <0%> (-0.05%) :arrow_down:
tests/packet_compositions/mod.rs 97.5% <0%> (ø) :arrow_up:
src/transport/tcp.rs 99.82% <0%> (+0.17%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8fc1f75...555710b. Read the comment docs.

JulianSchmid commented 4 years ago

Cool thanks. I will release this in a patch release of the create.