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

Fix string id edge cases #1460

Merged
merged 3 commits into from
Jan 19, 2024
Merged

Fix string id edge cases #1460

merged 3 commits into from
Jan 19, 2024

Conversation

ljeub-pometry
Copy link
Collaborator

What changes were proposed in this pull request?

Fix bugs in the string to id conversions:

        assert_ne!("+3".id(), "3".id());
        assert_eq!(3.id(), "3".id());
        assert_ne!("00".id(), "0".id());
        assert_eq!("0".id(), 0.id());

Why are the changes needed?

name collisions for nodes

Does this PR introduce any user-facing change? If yes is this documented?

How was this patch tested?

added test for the edge cases above

Issues

Are there any further changes required?

@miratepuffin miratepuffin merged commit 63b9be8 into master Jan 19, 2024
10 checks passed
@miratepuffin miratepuffin deleted the bug/id_edge_cases branch January 19, 2024 11:17
fabianmurariu pushed a commit that referenced this pull request May 21, 2024
* fix number detection edge cases for string to id conversion and add some tests

* fix the test that was testing broken behaviour

* custom parsing function instead of regex for speed
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.

2 participants