I am trying to use BigInt. My code is as follows:
extern crate num;
use num::bigint::BigInt;
...
println!("{}", from_str::<BigInt>("1"));
In my Cargo.toml file, I have the following:
[dependencies]
num = "0.1.30"
That I seem to be consistent with what was said in this document , also this document , as well as the answer here about the stack overflow .
However, I got the following error:
Compiling example v0.1.0 (file:///C:/src/rust/example)
src\main.rs:91:20: 91:38 error: unresolved name `from_str` [E0425]
src\main.rs:91 println!("{}", from_str::<BigInt>("1"));
source
share