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

Numbers are always be parsed to Value::F64 #8

Closed
zonyitoo opened this issue Dec 14, 2018 · 0 comments
Closed

Numbers are always be parsed to Value::F64 #8

zonyitoo opened this issue Dec 14, 2018 · 0 comments

Comments

@zonyitoo
Copy link
Contributor

zonyitoo commented Dec 14, 2018

{
  # specify rate in requests/second (because comments are helpful!)
  rate: 1000
}

This is the example taken from README. And we have to use the value of rate by as_f64 like this:

let rate = sample.get("rate").unwrap().as_f64().unwrap();

1000 should be Value::U64 or at least Value::I64.

Maybe we can represent number values as Value::Number like serde-json does?

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

No branches or pull requests

1 participant