mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 04:41:02 +00:00
depend-o-pocalipse (#9450)
Remove unneeded dependencies and dev-dependencies. Made self_destruct test not dependent on wasm bin size. Updated code related to deprecated warning on tracing-subscriber `scope()` ( See https://github.com/tokio-rs/tracing/issues/1429 )
This commit is contained in:
@@ -15,7 +15,9 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [
|
||||
"derive",
|
||||
] }
|
||||
integer-sqrt = "0.1.2"
|
||||
static_assertions = "1.1.0"
|
||||
num-traits = { version = "0.2.8", default-features = false }
|
||||
@@ -26,7 +28,6 @@ sp-debug-derive = { version = "3.0.0", default-features = false, path = "../debu
|
||||
[dev-dependencies]
|
||||
rand = "0.7.2"
|
||||
criterion = "0.3"
|
||||
serde_json = "1.0"
|
||||
primitive-types = "0.10.0"
|
||||
|
||||
[features]
|
||||
|
||||
@@ -18,7 +18,6 @@ sp-arithmetic = { version = "4.0.0-dev", path = ".." }
|
||||
honggfuzz = "0.5.49"
|
||||
primitive-types = "0.10.0"
|
||||
num-bigint = "0.2"
|
||||
num-traits = "0.2"
|
||||
|
||||
[[bin]]
|
||||
name = "biguint"
|
||||
|
||||
@@ -392,18 +392,20 @@ where
|
||||
// Already rounded down
|
||||
Rounding::Down => {},
|
||||
// Round up if the fractional part of the result is non-zero.
|
||||
Rounding::Up =>
|
||||
Rounding::Up => {
|
||||
if rem_mul_upper % denom_upper > 0.into() {
|
||||
// `rem * numer / denom` is less than `numer`, so this will not overflow.
|
||||
rem_mul_div_inner += 1.into();
|
||||
},
|
||||
}
|
||||
},
|
||||
// Round up if the fractional part of the result is greater than a half. An exact half is
|
||||
// rounded down.
|
||||
Rounding::Nearest =>
|
||||
Rounding::Nearest => {
|
||||
if rem_mul_upper % denom_upper > denom_upper / 2.into() {
|
||||
// `rem * numer / denom` is less than `numer`, so this will not overflow.
|
||||
rem_mul_div_inner += 1.into();
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
rem_mul_div_inner.into()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user