Skip to content

refactor(warn): replace #[cfg] with cfg! macro to fix unused variable warning - #1791

Merged
pszymkowiak merged 1 commit into
rtk-ai:developfrom
xdm67x:refactor/unused-error-warning-fix
May 10, 2026
Merged

pszymkowiak merged 1 commit into
rtk-ai:developfrom
xdm67x:refactor/unused-error-warning-fix

Conversation

@xdm67x

@xdm67x xdm67x commented May 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Resolve unused variable warning in utils.rs by replacing the #[cfg] with cfg! macro and refactoring the code to make it more elegant.

Test plan

  • cargo fmt --all && cargo clippy --all-targets && cargo test
  • Manual testing: rtk <command> output inspected

@pszymkowiak pszymkowiak left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM — cfg!() is compile-time, branches get eliminated by the optimizer. Behavior is equivalent across all platform/profile combos (Windows always logs, non-Windows logs only in debug). CI fully green.

@pszymkowiak
pszymkowiak merged commit 0a55201 into rtk-ai:develop May 10, 2026
12 checks passed
@aeppling aeppling mentioned this pull request May 10, 2026
@xdm67x
xdm67x deleted the refactor/unused-error-warning-fix branch May 14, 2026 20:36
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