Remove rust_decimal unnecessary num-traits

This commit is contained in:
吴翱翔 2020-07-29 10:46:16 +08:00 committed by Ryan Leckey
parent 002929ed2e
commit c6fa9047b9
3 changed files with 3 additions and 6 deletions

1
Cargo.lock generated
View File

@ -2067,7 +2067,6 @@ dependencies = [
"md-5",
"memchr",
"num-bigint",
"num-traits",
"once_cell",
"parking_lot",
"percent-encoding",

View File

@ -27,7 +27,7 @@ any = []
# types
all-types = [ "chrono", "time", "bigdecimal", "decimal", "ipnetwork", "json", "uuid", "bit-vec" ]
bigdecimal = [ "bigdecimal_", "num-bigint" ]
decimal = [ "rust_decimal", "num-bigint", "num-traits" ]
decimal = [ "rust_decimal", "num-bigint" ]
json = [ "serde", "serde_json" ]
# runtimes
@ -43,8 +43,7 @@ atoi = "0.3.2"
sqlx-rt = { path = "../sqlx-rt", version = "0.1.1" }
base64 = { version = "0.12.1", default-features = false, optional = true, features = [ "std" ] }
bigdecimal_ = { version = "0.1.0", optional = true, package = "bigdecimal" }
rust_decimal = { version = "1.6.0", optional = true }
num-traits = { version = "0.2.12", optional = true }
rust_decimal = { version = "1.7.0", optional = true }
bit-vec = { version = "0.6.2", optional = true }
bitflags = { version = "1.2.1", default-features = false }
bytes = "0.5.4"

View File

@ -1,6 +1,5 @@
use num_bigint::{BigInt, Sign};
use num_traits::ToPrimitive;
use rust_decimal::{prelude::Zero, Decimal};
use rust_decimal::{Decimal, prelude::{Zero, ToPrimitive}};
use std::convert::{TryFrom, TryInto};
use crate::decode::Decode;