Ogeon / palette

A Rust library for linear color calculations and conversion
Apache License 2.0
755 stars 60 forks source link

Avoid recursive trait resolution for `IntoIterator` #380

Closed Ogeon closed 9 months ago

Ogeon commented 9 months ago

A workaround for another case of #283. This time for IntoIterator. It avoids the issue by only providing implementations for specific collection types.

Closed Issues

Breaking Change

This makes IntoIterator no longer generic over the collection type, but explicitly covers [T; N], &[T], &mut [T] , Vec<T>, and Box<[T]>.

codecov[bot] commented 9 months ago

Codecov Report

Attention: Patch coverage is 96.56250% with 22 lines in your changes are missing coverage. Please review.

Project coverage is 81.82%. Comparing base (7e446ea) to head (ce86a27). Report is 4 commits behind head on master.

Files Patch % Lines
palette/src/macros/struct_of_arrays.rs 96.39% 21 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #380 +/- ## ========================================== + Coverage 81.21% 81.82% +0.61% ========================================== Files 113 113 Lines 17822 18068 +246 Branches 17822 18068 +246 ========================================== + Hits 14474 14785 +311 + Misses 3190 3125 -65 Partials 158 158 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codspeed-hq[bot] commented 9 months ago

CodSpeed Performance Report

Merging #380 will degrade performances by 20.49%

:warning: No base runs were found

Falling back to comparing issue_283_into_iterator (ce86a27) with master (25ca8af)

Summary

❌ 1 (👁 1) regressions ✅ 44 untouched benchmarks

:warning: _Please fix the performance issues or acknowledge them on CodSpeed._

Benchmarks breakdown

Benchmark master issue_283_into_iterator Change
👁 matrix_inverse 215.6 ns 271.1 ns -20.49%