Skip to content

Update capture function return type for PixelProvider#14747

Merged
rustdesk merged 1 commit intorustdesk:masterfrom
leolouis:patch-5
Apr 13, 2026
Merged

Update capture function return type for PixelProvider#14747
rustdesk merged 1 commit intorustdesk:masterfrom
leolouis:patch-5

Conversation

@leolouis
Copy link
Copy Markdown
Contributor

@leolouis leolouis commented Apr 12, 2026

Summary by CodeRabbit

  • Refactor
    • Enhanced type safety in the screen recording capture functionality with improved lifetime management.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2988d0a8-a8a6-4f53-a117-cbdf33d0ef54

📥 Commits

Reviewing files that changed from the base of the PR and between 2f694c0 and 075b91e.

📒 Files selected for processing (1)
  • libs/scrap/src/wayland/pipewire.rs

📝 Walkthrough

Walkthrough

Added an explicit lifetime parameter to the PixelProvider return type in the PipeWireRecorder::capture method signature. The change modifies the return type from Result<PixelProvider, Box<dyn Error>> to Result<PixelProvider<'_>, Box<dyn Error>> without altering internal implementation or control flow.

Changes

Cohort / File(s) Summary
Lifetime Parameter Addition
libs/scrap/src/wayland/pipewire.rs
Updated capture method signature in Recorder trait implementation to include explicit lifetime parameter <'_> on PixelProvider return type.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A lifetime bound, so crisp and clear,
The borrow checker's now sincere,
No more ambiguity in sight,
PixelProvider's labeled right! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating the return type of the capture function to include an explicit lifetime parameter for PixelProvider.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@rustdesk rustdesk merged commit 771cb4e into rustdesk:master Apr 13, 2026
20 checks passed
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.

2 participants