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): Impl fmt::debug for Range #6926

Merged
merged 2 commits into from
Dec 26, 2024

Conversation

julio4
Copy link
Contributor

@julio4 julio4 commented Dec 25, 2024

Formats a Range type, allowing to print Range instances for debugging purposes.

Example

println!("{:?}", 1..5); // Result will be `1..5`

@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.

Reviewed 1 of 3 files at r1.
Reviewable status: 1 of 3 files reviewed, 1 unresolved discussion (waiting on @julio4)


corelib/src/test/range_test.cairo line 3 at r1 (raw file):

#[test]
fn test_range_format() {
    assert(format!("{:?}", 1..5) == "1..5", 'bad range debug formatting');

Suggestion:

    assert!(format!("{:?}", 1..5) == "1..5");

Copy link
Contributor Author

@julio4 julio4 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: 1 of 3 files reviewed, 1 unresolved discussion (waiting on @orizi)


corelib/src/test/range_test.cairo line 3 at r1 (raw file):

#[test]
fn test_range_format() {
    assert(format!("{:?}", 1..5) == "1..5", 'bad range debug formatting');

Done.

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 1 of 3 files at r1, all commit messages.
Reviewable status: 2 of 3 files reviewed, all discussions resolved


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

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:

Reviewable status: 2 of 3 files reviewed, all discussions resolved (waiting on @orizi)

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 1 of 1 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @julio4)

@orizi orizi enabled auto-merge December 26, 2024 08:18
@orizi orizi added this pull request to the merge queue Dec 26, 2024
Merged via the queue into starkware-libs:main with commit 20caf9b Dec 26, 2024
47 checks passed
@julio4 julio4 deleted the feat/range_fmt_debug branch December 26, 2024 08:26
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