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

fix: remove mut self from set_native_icon signature #7866

Merged
merged 5 commits into from
Sep 20, 2023

Conversation

logankeenan
Copy link
Sponsor Contributor

@logankeenan logankeenan commented Sep 20, 2023

What kind of change does this PR introduce?

I'm getting a compile error in the latest alpha release. The error can be reproduced with this repo by running cargo tauri dev. It looks like the bug was introduced here.

error[E0596]: cannot borrow `self_.inner` as mutable, as `self_` is not declared as mutable
   --> /Users/logankeenan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-2.0.0-alpha.14/src/menu/icon.rs:210:49
    |
210 |       return run_main_thread!(self, |self_: Self| self_
    |  _________________________________________________^
211 | |       .inner
212 | |       .set_native_icon(_icon.map(Into::into)));
    | |_____________________________________________^ cannot borrow as mutable
    |
help: consider changing this to be mutable
    |
210 |     return run_main_thread!(self, |mut self_: Self| self_
    |                                    +++

For more information about this error, try `rustc --explain E0596`.
error: could not compile `tauri` (lib) due to previous error

  • Bugfix
  • Feature
  • Docs
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes, and the changes were approved in issue #___
  • No

Checklist

  • When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • I have added a convincing reason for adding this feature, if necessary

Other information

@logankeenan logankeenan requested a review from a team as a code owner September 20, 2023 14:03
@logankeenan logankeenan changed the title FIX: set_native_icon usage of self to mut fix: set_native_icon usage of self to mut Sep 20, 2023
Copy link
Member

@amrbashir amrbashir left a comment

Choose a reason for hiding this comment

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

Thank you for your contributions! Could you also add a changefile in .changes directory?

core/tauri/src/menu/icon.rs Outdated Show resolved Hide resolved
core/tauri/src/menu/icon.rs Outdated Show resolved Hide resolved
core/tauri/src/menu/icon.rs Outdated Show resolved Hide resolved
@logankeenan logankeenan changed the title fix: set_native_icon usage of self to mut fix: remove mut self from set_native_icon Sep 20, 2023
@logankeenan logankeenan changed the title fix: remove mut self from set_native_icon fix: remove mut self from set_native_icon signature Sep 20, 2023
@logankeenan
Copy link
Sponsor Contributor Author

@amrbashir, thanks for the feedback. All changes have been made

@amrbashir amrbashir merged commit a2021c3 into tauri-apps:dev Sep 20, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔎 In audit
Development

Successfully merging this pull request may close these issues.

None yet

2 participants