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

UnicodeSet Builder L2 #195

Merged
merged 45 commits into from
Aug 25, 2020
Merged

UnicodeSet Builder L2 #195

merged 45 commits into from
Aug 25, 2020

Conversation

EvanJP
Copy link
Contributor

@EvanJP EvanJP commented Aug 4, 2020

The L2 Builder API as discussed in #91.

Provides:

  • UnicodeSetBuilder::new()
  • UnicodeSetBuilder::build() -> UnicodeSet
  • add_char, add_range, add_set
  • remove_char, remove_range, remove_set
  • retain_char, retain_range, retain_set
  • complement, complement_char, complement_range, complement_set
  • Cargo Docs

@EvanJP EvanJP self-assigned this Aug 4, 2020
@coveralls
Copy link

coveralls commented Aug 4, 2020

Pull Request Test Coverage Report for Build 0582acb9f2970b30bb1669aeb832094b1317df5a-PR-195

  • 445 of 447 (99.55%) changed or added relevant lines in 2 files are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.7%) to 91.5%

Changes Missing Coverage Covered Lines Changed/Added Lines %
components/uniset/src/builder.rs 442 444 99.55%
Files with Coverage Reduction New Missed Lines %
components/locale/src/langid.rs 5 0%
Totals Coverage Status
Change from base Build 9a296e8accc5ca174c2cb0432beec34491c266ff: 0.7%
Covered Lines: 1604
Relevant Lines: 1753

💛 - Coveralls

Copy link
Member

@sffc sffc left a comment

Choose a reason for hiding this comment

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

A few initial comments

components/uniset/src/builder.rs Outdated Show resolved Hide resolved
components/uniset/src/builder.rs Outdated Show resolved Hide resolved
components/uniset/src/builder.rs Outdated Show resolved Hide resolved
Copy link
Member

@sffc sffc left a comment

Choose a reason for hiding this comment

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

Great work!

components/uniset/src/builder.rs Outdated Show resolved Hide resolved
components/uniset/src/builder.rs Outdated Show resolved Hide resolved
components/uniset/src/builder.rs Outdated Show resolved Hide resolved
components/uniset/src/builder.rs Outdated Show resolved Hide resolved
components/uniset/src/builder.rs Outdated Show resolved Hide resolved
components/uniset/src/builder.rs Outdated Show resolved Hide resolved
components/uniset/src/builder.rs Outdated Show resolved Hide resolved
components/uniset/src/builder.rs Show resolved Hide resolved
components/uniset/src/builder.rs Show resolved Hide resolved
components/uniset/src/uniset.rs Outdated Show resolved Hide resolved
sffc
sffc previously requested changes Aug 10, 2020
components/uniset/src/builder.rs Outdated Show resolved Hide resolved
components/uniset/src/builder.rs Outdated Show resolved Hide resolved
components/uniset/src/builder.rs Outdated Show resolved Hide resolved
components/uniset/src/builder.rs Outdated Show resolved Hide resolved
Copy link
Member

@sffc sffc left a comment

Choose a reason for hiding this comment

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

I think add and remove should be essentially the same algorithm, with just minor differences (e.g., switching even for odd). Can you make the two functions more similar to each other, for example, by making the variable names the same? If there are any differences in business logic, try to figure out why those differences exist and leave comments.

@EvanJP EvanJP assigned EvanJP and unassigned EvanJP Aug 12, 2020
echeran
echeran previously approved these changes Aug 14, 2020
zbraniecki
zbraniecki previously approved these changes Aug 18, 2020
components/uniset/src/builder.rs Show resolved Hide resolved
@sffc sffc dismissed their stale review August 18, 2020 21:39

Changes are no longer blocking

@sffc
Copy link
Member

sffc commented Aug 18, 2020

I still have an open comment, but otherwise this looks good.

@EvanJP EvanJP dismissed stale reviews from zbraniecki and echeran via b346a56 August 24, 2020 17:05
@EvanJP EvanJP merged commit 862b342 into unicode-org:master Aug 25, 2020
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.

5 participants