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 let_underscore_lock lint #203

Merged
merged 1 commit into from
Feb 9, 2024
Merged

Conversation

Akida31
Copy link
Contributor

@Akida31 Akida31 commented Feb 9, 2024

Recently the fix_underscore_lock lint was improved and throws now (as of the upcoming rust 1.77 which will be released March 21st) an error.
Therefore I created separate methods for locking only WallpaperInner.

An alternative could be that the _ is converted to _temp and then the next statement could be drop(_temp) to stay with the current behaviour but silence the lint.

Preview of the error:
screen

[Recently][1] the [fix_underscore_lock][2] lint was improved and throws
now (as of the upcoming rust 1.77) an error.
Therefore I created separate methods for locking only `WallpaperInner`.

An alternative could be that the `_` is converted to `_temp` and then
the next statement could be `drop(_temp)` to stay with the current
behaviour but silence the lint.

[1]: rust-lang/rust#119710
[2]: https://doc.rust-lang.org/beta/nightly-rustc/rustc_lint/let_underscore/static.LET_UNDERSCORE_LOCK.html
@LGFae
Copy link
Owner

LGFae commented Feb 9, 2024

LGTM, thanks!

@LGFae LGFae merged commit 01e9cf8 into LGFae:main Feb 9, 2024
@Akida31 Akida31 deleted the fix_underscore_lock branch February 9, 2024 13:51
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