Skip to content

Remove redundant backend borrows - #158

Merged
bea4dev merged 1 commit into
bea4dev:mainfrom
marcoallegretti:simplification/redundant-backend-borrows
Oct 24, 2026
Merged

bea4dev merged 1 commit into
bea4dev:mainfrom
marcoallegretti:simplification/redundant-backend-borrows

Conversation

@marcoallegretti

Copy link
Copy Markdown
Contributor

Summary

Remove 58 redundant borrows from the TTY and Winit rendering backends.

Clippy identified these expressions as references that Rust immediately dereferences again. The affected values were already references, so the additional borrow introduced unnecessary indirection without changing ownership or behavior.

Changes

  • Remove 49 redundant borrows from the TTY backend.
  • Remove 9 redundant borrows from the Winit backend.
  • Keep the change limited to clippy::needless_borrow.

Verification

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --locked -- -D clippy::needless-borrow

No new tests were added because this only simplifies call-site reference forwarding and introduces no new behavior.

API impact

No API break. No public types, signatures, or ownership contracts are changed.

Closes #157

@marcoallegretti

Copy link
Copy Markdown
Contributor Author

This change is functionally independent from #155, but it should be considered after that PR is merged.

#155 establishes the project’s CI baseline. Once it lands, this branch can be rebased onto the updated main branch so the new CI jobs validate the change before it is marked ready.

Until then, I will keep this PR in draft.

@bea4dev
bea4dev marked this pull request as ready for review October 24, 2026 11:18
@bea4dev

bea4dev commented Oct 24, 2026

Copy link
Copy Markdown
Owner

thanks! LGTM!

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.

Simplification: remove redundant borrows from the TTY and Winit backends

2 participants