fe21c725e8
bigint: Create the parsing error better for nested `+` If a `+` is encountered in the middle of parsing a BigUint, this should generate an `ParseIntError::InvalidDigit`. Since we can't create that directly, we get it by trying to parse a `u64` from this point, but of course `+` is a perfectly valid prefix to a `u64`. Now we include the previous character in the string passed to `u64`, so it has proper parsing context to understand what's in error. Fixes #268. |
||
---|---|---|
benches | ||
bigint | ||
ci | ||
complex | ||
derive | ||
doc | ||
integer | ||
iter | ||
macros | ||
rational | ||
src | ||
traits | ||
.gitignore | ||
.travis.yml | ||
Cargo.toml | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
README.md |
README.md
num
A collection of numeric types and traits for Rust.
This includes new types for big integers, rationals, and complex numbers, new traits for generic programming on numeric properties like `Integer, and generic range iterators.
Usage
Add this to your Cargo.toml
:
[dependencies]
num = "0.1"
and this to your crate root:
extern crate num;
Compatibility
Most of the num
crates are tested for rustc 1.8 and greater.
The exceptions are num-derive
which requires at least rustc 1.15,
and the deprecated num-macros
which requires nightly rustc.