Skip to content

Commit f0bc559

Browse files
committed
Auto merge of #196 - SuperFluffy:remove_use_serde, r=hauleth
`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`. ```
2 parents 72a146b + c854338 commit f0bc559

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

complex/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ use std::fmt;
2323
use std::hash;
2424
use std::ops::{Add, Div, Mul, Neg, Sub};
2525

26-
#[cfg(feature = "serde")]
27-
use serde;
28-
2926
use traits::{Zero, One, Num, Float};
3027

3128
// FIXME #1284: handle complex NaN & infinity etc. This

0 commit comments

Comments
 (0)