You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CI installs the current stable Rust and runs clippy with -D warnings. Rust 1.100.0 turns two patterns the code uses into warnings, so the Clippy step fails on every branch, main included. The first error CI reports is in fframes-media/src/video_decoder.rs.
Changes
clippy::map_unwrap_or: .map(f).unwrap_or_default() becomes .map_or_default(f), on Option and Result.
clippy::chunks_exact_to_as_chunks: chunks_exact(N) with a constant N becomes as_chunks::<N>().0. The site in fframes-editor-controller/src/wasm_font_source.rs now reads each pair with u16::from_be_bytes.
fframes/benches/yuv420_conversion.rs: semicolons after calls that return ().
examples/svg-in-3d/tests/recursion.rs: on macOS the test does not read b_on_gpu, so the field and the Ordering import gave warnings there. These are not new in 1.100.
No behavior changes.
Checks
cargo clippy --workspace --all-targets -- -D warnings is clean with Rust 1.100.0 and with 1.99.0.
cargo clippy -p fframes_skia_renderer --features vulkan,wgpu,cli,metal --all-targets -- -D warnings is clean with 1.100.0.
cargo fmt --all --check, just check-wasm hello-world and the tests of fframes, fframes-media, fframes_three_d, fframes_skia_renderer and cargo-fframes pass.
All of this ran on macOS. Code that compiles only on Linux or Windows was searched for the two patterns but not linted; CI covers it.
Summary by CodeRabbit
Refactor
Streamlined handling of optional values across rendering, media processing, and timeline features. Existing outputs and default behavior are unchanged.
Updated image and pixel processing in rendering examples and tests without changing results.
No actionable comments were generated in the recent review.
Walkthrough
The PR replaces several map-and-default patterns with map_or_default while retaining the described default results. It also updates slice handling in UTF-16 decoding and pixel tests, adjusts macOS-specific test declarations, and adds semicolons to benchmark statements.
Changes: API and syntax updates
Layer / File(s)
Summary
CLI and example defaulting cargo-fframes/src/main.rs, examples/conference-splash-screen/src/bin/render_all.rs, examples/fframes-intro/src/scenes/*, examples/podcast/src/podcast.rs
CLI text and dependency generation, example descriptions, image rendering, and audio visualizations use map_or_default with the described defaults retained.
Runtime and media defaulting fframes-media/src/video_decoder.rs, fframes-skia-renderer/src/backends/vulkan.rs, fframes-three-d/src/gltf.rs, fframes/src/audio_mix.rs, fframes/src/diagnostics.rs, fframes/src/lottie.rs, fframes/src/renderer/fframes_logger.rs, fframes/src/renderer/preview.rs, fframes/src/time_spec.rs, fframes/src/video_data.rs
Runtime, renderer, media, and glTF conversions replace map-and-default chains with map_or_default.
Slice handling and test adjustments fframes-editor-controller/src/wasm_font_source.rs, fframes-skia-renderer/src/backends/vulkan_lifetime_tests.rs, fframes-skia-renderer/tests/fast_shapes.rs, examples/svg-in-3d/tests/recursion.rs, fframes/benches/yuv420_conversion.rs
UTF-16 decoding and pixel tests use slice chunk APIs. The recursion test adjusts macOS-specific declarations, and benchmark statements use semicolons.
This change replaces several Option and Result defaulting patterns and a few slice-chunking calls so Clippy passes on the newer Rust toolchain. Behavior is intended to stay the same. No concrete risk was found, so it looks safe to merge once CI passes.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "fix: clippy warnings of Rust 1.100" matches the main change. The PR replaces map/unwrap_or_default chains with map_or_default, swaps chunks_exact for as_chunks, adds semicolons in benches, …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "fix: clippy warnings of Rust 1.100" matches the main change. The PR replaces map/unwrap_or_default chains with map_or_default, swaps chunks_exact for as_chunks, adds semicolons in benches, and fixes macOS-only unused warnings. These all address Clippy warnings for Rust 1.100. The title is short, specific, and follows the conventional commit style. It does not list every file, which is acceptable.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CI installs the current stable Rust and runs clippy with
-D warnings. Rust 1.100.0 turns two patterns the code uses into warnings, so theClippystep fails on every branch,mainincluded. The first error CI reports is infframes-media/src/video_decoder.rs.Changes
clippy::map_unwrap_or:.map(f).unwrap_or_default()becomes.map_or_default(f), onOptionandResult.clippy::chunks_exact_to_as_chunks:chunks_exact(N)with a constantNbecomesas_chunks::<N>().0. The site infframes-editor-controller/src/wasm_font_source.rsnow reads each pair withu16::from_be_bytes.fframes/benches/yuv420_conversion.rs: semicolons after calls that return().examples/svg-in-3d/tests/recursion.rs: on macOS the test does not readb_on_gpu, so the field and theOrderingimport gave warnings there. These are not new in 1.100.No behavior changes.
Checks
cargo clippy --workspace --all-targets -- -D warningsis clean with Rust 1.100.0 and with 1.99.0.cargo clippy -p fframes_skia_renderer --features vulkan,wgpu,cli,metal --all-targets -- -D warningsis clean with 1.100.0.cargo fmt --all --check,just check-wasm hello-worldand the tests offframes,fframes-media,fframes_three_d,fframes_skia_rendererandcargo-fframespass.Summary by CodeRabbit