-
Notifications
You must be signed in to change notification settings - Fork 75
Bump tantivy version 0.17.0 #45
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
Conversation
@ChillFish8 could you review? |
I'll try review this over the weekend, my computer's decided to call it quits right now so I'm unable to test this pr until then. |
Formated with Rustfmt and pushed again. thx. |
JsonValue::Number(n) => match n { | ||
n if n.is_i64() => n.as_i64().to_object(py), | ||
n if n.is_u64() => n.as_u64().to_object(py), | ||
n if n.is_f64() => n.as_f64().to_object(py), | ||
_ => panic!("number too large"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I know this is slightly pedantic, but I'm pretty sure you can match on the num variant i.e Number::I64
which should remove the need for this panic. I think it'll be more idiomatic that way. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The enum inside Number is a enum of
enum N {
PosInt(u64),
/// Always less than zero.
NegInt(i64),
/// Always finite.
Float(f64),
}
And it's a private field. So I don't figure out how to match them directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that's a bit annoying. Oh well, happy to merge!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! But I don't have the write access. Please help to merge it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
No description provided.