Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prompt: remove mut from fd variable to remove warning #1879

Closed
wants to merge 1 commit into from

Conversation

rzmk
Copy link
Collaborator

@rzmk rzmk commented Jun 14, 2024

warning: variable does not need to be mutable
   --> src\cmd\prompt.rs:162:13
    |
162 |         let mut fd = FileDialog::new()
    |             ----^^
    |             |
    |             help: remove this `mut`
    |
    = note: `#[warn(unused_mut)]` on by default

warning: variable does not need to be mutable
   --> src\cmd\prompt.rs:162:13
    |
162 |         let mut fd = FileDialog::new()
    |             ----^^
    |             |
    |             help: remove this `mut`
    |
    = note: `#[warn(unused_mut)]` on by default
@rzmk rzmk marked this pull request as draft June 14, 2024 21:42
@jqnatividad
Copy link
Collaborator

Thanks for this @rzmk,

But this is because on macOS, rfd has the set_can_create_directories option not available on Windows nor Linux.

I'll tweak it instead so the conditional compilation does not trigger the unused_mut lint.

@jqnatividad
Copy link
Collaborator

Fine-tuned the conditional compilation instead @rzmk . Thanks for catching this!

b15c6fd

@rzmk rzmk deleted the prompt-warning branch June 15, 2024 02:59
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