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

feat(corelib): range is_empty #6925

Merged
merged 2 commits into from
Dec 26, 2024
Merged

Conversation

julio4
Copy link
Contributor

@julio4 julio4 commented Dec 25, 2024

Add core::ops::RangeTrait with:

fn is_empty(self: @Range<T>) -> bool

Returns true if the range contains no items.

Examples

assert!(!(3_u8..5_u8).is_empty());
assert!( (3_u8..3_u8).is_empty());
assert!( (3_u8..2_u8).is_empty());

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator

@orizi orizi 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 4 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @julio4)


a discussion (no related file):
@gilbens-starkware for 2nd eye.

Copy link
Collaborator

@orizi orizi 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 @julio4)

Copy link
Contributor

@gilbens-starkware gilbens-starkware 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 2 of 4 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @julio4)

@gilbens-starkware gilbens-starkware added this pull request to the merge queue Dec 26, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Dec 26, 2024
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @julio4)

@orizi orizi enabled auto-merge December 26, 2024 09:19
@orizi orizi added this pull request to the merge queue Dec 26, 2024
Merged via the queue into starkware-libs:main with commit d6f6e5d Dec 26, 2024
47 checks passed
@julio4 julio4 deleted the feat/range_is_empty branch February 5, 2025 10:58
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.

4 participants