generated from eigerco/beerus
-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Pull Request type - [ ] Bugfix - [X] Feature - [ ] Code style update (formatting, renaming) - [ ] Refactoring (no functional changes, no API changes) - [ ] Build-related changes - [ ] Documentation content changes - [ ] Other (please describe): ## What is the current behavior? Issue number [#172 ](#172) ## What is the new behavior? - Added the `unique` methods for `SpanTraitExt` & `ArrayTraitExt`, - Added the corresponding unit tests. ## Does this introduce a breaking change? - [ ] Yes - [X] No ## Other information For this little snippet: ```rust let shortest: Span<T> = if (self.len() <= 1) || (ret.len() <= self.len()) { ret.span() } else { self }; ``` Without the `self.len() <= 1` member some of my tests were failing. Tried multiple things but couldn't find any better even though I feel like there's a more optimized solution... Curious to have your inputs! 🙏 --------- Co-authored-by: akhercha <[email protected]> Co-authored-by: gaetbout <[email protected]>
- Loading branch information
1 parent
46c8d8a
commit 7bc7b8a
Showing
2 changed files
with
100 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters