Skip to content

Commit 5b2976d

Browse files
committed
Release v0.2.2
2 parents 17cabf9 + 63eaee0 commit 5b2976d

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
- checkout
7171
- rust/build
7272
- rust/format
73-
- rust/clippy
73+
# - rust/clippy
7474
- rust/test
7575
- run:
7676
name: Build examples

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bigdecimal"
3-
version = "0.2.1"
3+
version = "0.2.2"
44
authors = ["Andrew Kubera"]
55
description = "Arbitrary precision decimal numbers"
66
documentation = "https://docs.rs/bigdecimal"
@@ -10,7 +10,7 @@ keywords = ["mathematics", "numerics", "decimal", "arbitrary-precision", "floati
1010
license = "MIT/Apache-2.0"
1111

1212
[dependencies]
13-
num-bigint = "0.4"
13+
num-bigint = "0.3"
1414
num-integer = "0.1"
1515
num-traits = "0.2"
1616
serde = { version = "1.0", optional = true }

src/lib.rs

+6-9
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@
4545
#![allow(clippy::suspicious_op_assign_impl)]
4646
#![allow(clippy::redundant_field_names)]
4747

48-
extern crate num_bigint;
48+
pub extern crate num_bigint;
49+
pub extern crate num_traits;
4950
extern crate num_integer;
50-
extern crate num_traits as traits;
51+
5152
#[cfg(feature = "serde")]
5253
extern crate serde;
5354

@@ -63,8 +64,8 @@ use std::iter::Sum;
6364
use std::str::{self, FromStr};
6465

6566
use num_bigint::{BigInt, ParseBigIntError, Sign, ToBigInt};
66-
use num_integer::Integer;
67-
pub use traits::{FromPrimitive, Num, One, Signed, ToPrimitive, Zero};
67+
use num_integer::Integer as IntegerTrait;
68+
pub use num_traits::{FromPrimitive, Num, One, Signed, ToPrimitive, Zero};
6869

6970
const LOG2_10: f64 = 3.321928094887362_f64;
7071

@@ -1954,8 +1955,6 @@ mod bigdecimal_serde {
19541955
#[test]
19551956
#[cfg(not(feature = "string-only"))]
19561957
fn test_serde_deserialize_f64() {
1957-
use traits::FromPrimitive;
1958-
19591958
let vals = vec![
19601959
1.0,
19611960
0.5,
@@ -1981,7 +1980,7 @@ mod bigdecimal_serde {
19811980
#[cfg(test)]
19821981
mod bigdecimal_tests {
19831982
use BigDecimal;
1984-
use traits::{ToPrimitive, FromPrimitive, Zero};
1983+
use num_traits::{ToPrimitive, FromPrimitive, Signed, Zero, One};
19851984
use std::convert::TryFrom;
19861985
use std::str::FromStr;
19871986
use num_bigint;
@@ -2262,7 +2261,6 @@ mod bigdecimal_tests {
22622261
#[test]
22632262
#[should_panic(expected = "Division by zero")]
22642263
fn test_division_by_zero_panics_v2() {
2265-
use traits::Zero;
22662264
let x = BigDecimal::from_str("3.14").unwrap();
22672265
let _r = x / BigDecimal::zero();
22682266
}
@@ -2872,7 +2870,6 @@ mod bigdecimal_tests {
28722870

28732871
#[test]
28742872
fn test_signed() {
2875-
use traits::{One, Signed, Zero};
28762873
assert!(!BigDecimal::zero().is_positive());
28772874
assert!(!BigDecimal::one().is_negative());
28782875

0 commit comments

Comments
 (0)