Conversation
Stargateur
left a comment
There was a problem hiding this comment.
Most comment are the same for float double streaming and complete version
805e5be to
c734f41
Compare
|
@Stargateur Speaking of which, I'm guessing it's a good idea to not mark any internal functions public? I did this somewhat because nom does it a lot internally, but it's probably not a good idea... |
Oh, well, I think unless someone have a good reason yeah we should not introduce too many pub item. |
|
Ok I believe every requested change has been made. |
| ($input:ident, $t:ident) => {{ | ||
| let (input, sign) = sign($input.clone())?; | ||
| let b = input.as_bytes(); | ||
| let (mut float, count) = if b.len() >= 3 { |
There was a problem hiding this comment.
this will not parse correctly in streaming: If we get Na as partial input it will return an error instead of Incomplete (once we refill the buffer, the next character could be N and we get NaN).
The Compare trait already handles those cases
Closes #1384, by adding logic to specially handle special floating-point numbers. This should correctly handle both streaming and complete parsers, and the unittests seem to confirm this, but a double-check of my logic would be appreciated.