`use serde;` leads to compilation error; `extern crate` is enough This PR fixes the compile error of `num-complex` that appears due to a redundant `use serde;` after `extern crate serde;` in the same module. To reproduce the error, just build `num-complex` with the feature `serde`, see below. ```zsh % cargo build --features serde Compiling num-complex v0.1.32 (file:///home/janis/github/num/complex) src/lib.rs:27:5: 27:10 error: an extern crate named `serde` has already been imported in this module [E0259] src/lib.rs:27 use serde; ^~~~~ src/lib.rs:19:1: 19:20 note: previous import of `serde` here src/lib.rs:19 extern crate serde; ^~~~~~~~~~~~~~~~~~~ src/lib.rs:27:5: 27:10 help: run `rustc --explain E0259` to see a detailed explanation error: aborting due to previous error error: Could not compile `num-complex`. ``` |
||
---|---|---|
.travis | ||
benches | ||
bigint | ||
complex | ||
doc | ||
integer | ||
iter | ||
macros | ||
rational | ||
src | ||
traits | ||
.gitignore | ||
.multirust.sh | ||
.travis.yml | ||
Cargo.toml | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
Makefile | ||
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;