parse_partial ignoring minus sign in presence of trailing characters
antislava opened this issue · comments
Rather counterintuitively, while e.g. lexical_core::parse_partial::<i8>(b"-3")
produces (-3, 2)
as expected, in presence of trailing non-digit characters this function seems to just ignore the minus sign: lexical_core::parse_partial::<i8>(b"-3a")
returns (3, 2)
, i.e. a positive number!
Is this intended behavior? (Couldn't find any clarification in the code/documentation.)
This is definitely a bug, thanks for reporting. I'll debug this quickly and draft a new release.
Confirmed this reproduces both with the compact
and default features.