Skip to content

fix: clippy warnings of Rust 1.100 - #268

Merged
dmtrKovalenko merged 1 commit into
mainfrom
fix/clippy-rust-1.100
Nov 14, 2026
Merged

dmtrKovalenko merged 1 commit into
mainfrom
fix/clippy-rust-1.100

Conversation

@dmtrKovalenko

@dmtrKovalenko dmtrKovalenko commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

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 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.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://fix-clippy-rust-1-100-fframes.dmitriy-86d.workers.dev (commit 0071ea5)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://a3e876a4-fframes.dmitriy-86d.workers.dev 0071ea5 2026-11-14T19:49:30.630Z Visit the dashboard ↗

@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Explain Change →

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.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Merge Risk: Minimal · up to 0071e

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: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed 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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0a7edaab-5d62-4890-bc0b-14f2a1e6ab49
Commits

Reviewing files that changed from the base of the PR and between 7cf6712 and 0071ea5.

Files selected for processing: 21

  • cargo-fframes/src/main.rs
  • examples/conference-splash-screen/src/bin/render_all.rs
  • examples/fframes-intro/src/scenes/agents.rs
  • examples/fframes-intro/src/scenes/preview.rs
  • examples/fframes-intro/src/scenes/video.rs
  • examples/podcast/src/podcast.rs
  • examples/svg-in-3d/tests/recursion.rs
  • fframes-editor-controller/src/wasm_font_source.rs
  • fframes-media/src/video_decoder.rs
  • fframes-skia-renderer/src/backends/vulkan.rs
  • fframes-skia-renderer/src/backends/vulkan_lifetime_tests.rs
  • fframes-skia-renderer/tests/fast_shapes.rs
  • fframes-three-d/src/gltf.rs
  • fframes/benches/yuv420_conversion.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

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.

@dmtrKovalenko
dmtrKovalenko merged commit 420d9df into main Nov 14, 2026
14 checks passed
@dmtrKovalenko
dmtrKovalenko deleted the fix/clippy-rust-1.100 branch November 14, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant