Skip to content

fix: remove unused import get_window_option_value - code hygiene#289

Merged
psmux merged 1 commit into
masterfrom
fix/unused-import-get-window-option-value
May 12, 2026
Merged

fix: remove unused import get_window_option_value - code hygiene#289
psmux merged 1 commit into
masterfrom
fix/unused-import-get-window-option-value

Conversation

@tarikguney

@tarikguney tarikguney commented May 11, 2026

Copy link
Copy Markdown
Collaborator

Problem

When I was isntalling the latest the psmux with cargo using the command cargo install --git github.com/psmux/psmux , I ran into the following warning:

image Since it is a warning, it was not a blocker and the installation completed, but maintaining the source code hygiene, I opened this PR.

Summary

  • Drops the unused get_window_option_value symbol from the options use-declaration in src/server/mod.rs:26.
  • Both call sites (lines 264 and 3723) invoke crate::server::options::get_window_option_value_for(...) via the fully-qualified path, so the imported name is never referenced and triggers an unused_imports warning on build:
warning: unused import: `get_window_option_value`
 --> src/server/mod.rs:26:33
26 | use options::{get_option_value, get_window_option_value, render_window_options, apply_set_option};
   |                                 ^^^^^^^^^^^^^^^^^^^^^^^

Test plan

  • cargo build completes without the unused_imports warning

The two call sites use the fully-qualified `get_window_option_value_for`
helper, leaving the imported `get_window_option_value` unused and
triggering an `unused_imports` warning on build.
@tarikguney tarikguney changed the title fix: remove unused import get_window_option_value fix: remove unused import get_window_option_value - code hygiene May 11, 2026
@psmux psmux merged commit c8ebc6d into master May 12, 2026
8 checks passed
@psmux

psmux commented May 12, 2026

Copy link
Copy Markdown
Owner

Hey @tarikguney, thank you so much for this! Really appreciate you taking the time to notice that stale import and cleaning it up properly rather than just scrolling past it.

You are absolutely right, both call sites were already using the fully qualified path crate::server::options::get_window_option_value_for(...), so that import was just dead weight in the use declaration. Clean code is something I care about deeply, so this kind of contribution means a lot.

I have gone ahead and merged this in.Thank you!

@psmux

psmux commented May 12, 2026

Copy link
Copy Markdown
Owner

Hey @tarikguney, thank you so much for this! Really appreciate you taking the time to notice that stale import and cleaning it up properly rather than just scrolling past it.

You are absolutely right, both call sites were already using the fully qualified path crate::server::options::get_window_option_value_for(...), so that import was just dead weight in the use declaration. Clean code is something I care about deeply, so this kind of contribution means a lot.

I have gone ahead and merged this in. Welcome to the psmux contributor list and I hope to see more from you!

@tarikguney

Copy link
Copy Markdown
Collaborator Author

Thanks @psmux! Happy to be here.

@tarikguney tarikguney deleted the fix/unused-import-get-window-option-value branch May 12, 2026 06:00
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