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

is_u32 returns true for floats #152

Closed
Tim-Nosco opened this issue Jan 19, 2019 · 0 comments · Fixed by #174
Closed

is_u32 returns true for floats #152

Tim-Nosco opened this issue Jan 19, 2019 · 0 comments · Fixed by #174

Comments

@Tim-Nosco
Copy link
Contributor

Tim-Nosco commented Jan 19, 2019

{
    "entity_number": 57,
    "name": "fast-splitter",
    "position": {
        "x": -5.5,
        "y": 4
    },
    "direction": 4
}

In this example, obj["position"]["x"].as_i32().unwrap() == -55

Floats should return false for the is_<integer> functions.

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 a pull request may close this issue.

1 participant