Skip to content

refactor(rdpeusb): eliminate repetition#1407

Merged
Benoît Cortier (CBenoit) merged 1 commit into
Devolutions:masterfrom
uchouT:chore/repetition-eliminate
Jul 7, 2026
Merged

refactor(rdpeusb): eliminate repetition#1407
Benoît Cortier (CBenoit) merged 1 commit into
Devolutions:masterfrom
uchouT:chore/repetition-eliminate

Conversation

@uchouT

Copy link
Copy Markdown
Contributor

Copilot AI review requested due to automatic review settings July 3, 2026 15:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors ironrdp-rdpeusb’s UrbdrcDeviceClient to reduce repetition around pending I/O tracking and completion-message construction, following up on feedback from #1365.

Changes:

  • Consolidates repeated “is this request acceptable?” checks into accepts_io_request.
  • Replaces the Pending enum with PendingKind + Pending struct and centralizes completion lookup via pending_completion.
  • Extracts shared completion construction into build_*_completion helpers and reuses them across immediate and deferred completion paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@CBenoit Benoît Cortier (CBenoit) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@CBenoit Benoît Cortier (CBenoit) changed the title chore(rdpeusb): eliminate repetition refactor(rdpeusb): eliminate repetition Jul 7, 2026
@CBenoit Benoît Cortier (CBenoit) merged commit 32a8736 into Devolutions:master Jul 7, 2026
22 checks passed
@uchouT uchouT (uchouT) deleted the chore/repetition-eliminate branch July 7, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants