feat(Arrays): add uniquifySorted for value arrays#6571
Conversation
🦋 Changeset detectedLatest commit: ce08bae The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
WalkthroughThis PR adds 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Arrays.uniquifySortedforuint256[],address[], andbytes32[]memory arraysMotivation
Closes #5520.
This pairs naturally with
Arrays.sort()for consumers that need to sort short arrays and then remove duplicates without allocating a second result array.Testing
npx hardhat test test/utils/Arrays.test.js~/.foundry/bin/forge test --match-path test/utils/Arrays.t.sol