Browse Source

bigint, rational: use std::hash only for testing

Josh Stone 9 năm trước cách đây
mục cha
commit
21a328ad6d
2 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 1 0
      bigint/src/lib.rs
  2. 1 0
      rational/src/lib.rs

+ 1 - 0
bigint/src/lib.rs

@@ -79,6 +79,7 @@ use std::num::ParseIntError;
 use std::ops::{Add, BitAnd, BitOr, BitXor, Div, Mul, Neg, Rem, Shl, Shr, Sub};
 use std::str::{self, FromStr};
 use std::fmt;
+#[cfg(test)]
 use std::hash;
 use std::cmp::Ordering::{self, Less, Greater, Equal};
 use std::{f32, f64};

+ 1 - 0
rational/src/lib.rs

@@ -21,6 +21,7 @@ extern crate num_integer as integer;
 use std::cmp;
 use std::error::Error;
 use std::fmt;
+#[cfg(test)]
 use std::hash;
 use std::ops::{Add, Div, Mul, Neg, Rem, Sub};
 use std::str::FromStr;