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

[Cleanup]: Remove Android Studio Warning #18042

Merged
merged 1 commit into from
Mar 4, 2025

Conversation

ProtonStar12
Copy link

Purpose / Description

Optimizing function calls by converting arguments to Set for improved performance and reducing warnings.

Fixes

Approach

  • Converted Iterable<T> and Array<T> arguments to Set<T> to enhance efficiency in minus and intersect operations.
  • Updated UniqueArrayList.kt to improve removeAll and retainAll performance.
  • Modified test_retainAll() in UniqueArrayListTest.kt to use setOf() for better efficiency.

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have performed a self-review of your own code.

Copy link

welcome bot commented Mar 3, 2025

First PR! 🚀 We sincerely appreciate that you have taken the time to propose a change to AnkiDroid! Please have patience with us as we are all volunteers - we will get to this as soon as possible.

Copy link
Member

@lukstbit lukstbit left a comment

Choose a reason for hiding this comment

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

Hey, thank you for contributing. Left one minor issue and a question: judging by the approach section, are there other changes that were not included?

@lukstbit lukstbit added the Needs Author Reply Waiting for a reply from the original author label Mar 3, 2025
@ProtonStar12
Copy link
Author

No there were no other changes in mind

Copy link
Member

@lukstbit lukstbit left a comment

Choose a reason for hiding this comment

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

Ok, but please squash the two commits into a single commit. Then this can be merged.

@lukstbit lukstbit added Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) squash-merge The pull request currently requires maintainers to "Squash Merge" labels Mar 3, 2025
@ProtonStar12 ProtonStar12 force-pushed the fix-set-conversion-warnings branch from d6ebf7b to 2079ea1 Compare March 3, 2025 22:23
@lukstbit lukstbit removed Needs Author Reply Waiting for a reply from the original author squash-merge The pull request currently requires maintainers to "Squash Merge" labels Mar 4, 2025
@lukstbit lukstbit added this pull request to the merge queue Mar 4, 2025
@lukstbit
Copy link
Member

lukstbit commented Mar 4, 2025

Thanks!

Merged via the queue into ankidroid:main with commit d6ae45e Mar 4, 2025
9 checks passed
@github-actions github-actions bot added this to the 2.21 release milestone Mar 4, 2025
@github-actions github-actions bot removed the Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) label Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants