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 clippy warnings #7460

Merged
merged 2 commits into from
Jan 14, 2025
Merged

Fix clippy warnings #7460

merged 2 commits into from
Jan 14, 2025

Conversation

MarkusPettersson98
Copy link
Contributor

@MarkusPettersson98 MarkusPettersson98 commented Jan 13, 2025

This PR fixes recent clippy complaints that are currently hindering CI to become green: 1, 2.

The warning stemming from the objc crate is tricky to fix by keeping objc, as we would have to convert it to a git dependency.. See SSheldon/rust-objc#125 for details on that. What I instead did was to convert the little code we had that used objc to the much more well-maintained objc2 crate which does not generate these clippy warnings. We already have it in our tree because of nseventforwarder, so this change even reduced the total amount of dependencies we have! I see this as an absolute win.


This change is Reviewable

dlon
dlon previously approved these changes Jan 13, 2025
Copy link
Member

@dlon dlon left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 6 of 6 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @MarkusPettersson98)


mullvad-daemon/src/macos_launch_daemon.rs line 29 at r1 (raw file):

/// Implement Objective-C type encoding for the struct. Allows the `objc2` crate
/// to perform function signature matching before performing calls into the Objective-C
/// runtime. This is needed to be able to enable the `verify_message` feature on `objc`.

Nit: This feature doesn't exist anymore

Copy link
Contributor Author

@MarkusPettersson98 MarkusPettersson98 left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dlon)


mullvad-daemon/src/macos_launch_daemon.rs line 29 at r1 (raw file):

Previously, dlon (David Lönnhager) wrote…

Nit: This feature doesn't exist anymore

Soo, should I simply remove the last part of the comment ("This is needed to be able to enable the verify_message feature on objc."), or the entire impl Encode altogether? 🤔

Copy link
Member

@dlon dlon left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@MarkusPettersson98 MarkusPettersson98 merged commit d23d7ba into main Jan 14, 2025
56 checks passed
@MarkusPettersson98 MarkusPettersson98 deleted the fix-clippy-lints branch January 14, 2025 08:34
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