Skip to content

Commit 535dc02

Browse files
authored
Merge pull request #433 from DaniPopes/fix-hex
2 parents 9638047 + 319f77b commit 535dc02

File tree

6 files changed

+5
-9
lines changed

6 files changed

+5
-9
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
## [Unreleased]
1111

12+
- Remove unused `hex` dependencies which broke `no_std` ([#433])
13+
14+
[#433]: https://github.com/recmo/uint/pull/433
15+
1216
## [1.13.0] - 2025-02-18
1317

1418
- Support for borsh @ 1.5 ([#416])

Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ sqlx-core = { version = "0.8.2", optional = true }
9595

9696
# borsh
9797
borsh = { version = "1.5", optional = true, default-features = false }
98-
hex = "0.4"
9998

10099
[dev-dependencies]
101100
ruint = { path = ".", features = ["arbitrary", "proptest"] }

src/algorithms/gcd/matrix.rs

-4
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ impl Matrix {
188188

189189
// Compute a2
190190
let q = a0 / a1;
191-
// dbg!(q);
192191
let mut a2 = a0 - q * a1;
193192
let mut k2 = k0 + q * k1;
194193
if a2 < LIMIT {
@@ -205,7 +204,6 @@ impl Matrix {
205204

206205
// Compute a3
207206
let q = a1 / a2;
208-
// dbg!(q);
209207
let mut a3 = a1 - q * a2;
210208
let mut k3 = k1 + q * k2;
211209

@@ -222,7 +220,6 @@ impl Matrix {
222220
debug_assert!(a2 < a3);
223221
debug_assert!(a2 > 0);
224222
let q = a3 / a2;
225-
// dbg!(q);
226223
a3 -= q * a2;
227224
k3 += q * k2;
228225
if a3 < LIMIT {
@@ -239,7 +236,6 @@ impl Matrix {
239236
debug_assert!(a2 < a3);
240237
debug_assert!(a2 > 0);
241238
let q = a3 / a2;
242-
// dbg!(q);
243239
a3 -= q * a2;
244240
k3 += q * k2;
245241
}

src/bits.rs

-1
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,6 @@ mod tests {
819819
type U = Uint::<BITS, LIMBS>;
820820
proptest!(|(value: U, shift in 0..=BITS + 2)| {
821821
let shifted = value.arithmetic_shr(shift);
822-
// dbg!(value, shifted, shift);
823822
assert_eq!(shifted.leading_ones(), match value.leading_ones() {
824823
0 => 0,
825824
n => min(BITS, n + shift)

src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
clippy::cast_lossless,
2323
)]
2424
#![cfg_attr(test, allow(clippy::wildcard_imports, clippy::cognitive_complexity))]
25+
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
2526
#![cfg_attr(not(feature = "std"), no_std)]
2627
// Unstable features
2728
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]

src/support/postgres.rs

-3
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,6 @@ mod tests {
445445
if ty == &Type::FLOAT8 && f64::from(value).is_infinite() {
446446
return;
447447
}
448-
// dbg!(hex::encode(&serialized));
449448

450449
// Fetch ground truth value from Postgres
451450
let expr = match *ty {
@@ -461,12 +460,10 @@ mod tests {
461460
Type::JSON | Type::JSONB => format!("'\"{value:#x}\"'::{}", ty.name()),
462461
_ => format!("{value}::{}", ty.name()),
463462
};
464-
// dbg!(&expr);
465463
let ground_truth = {
466464
let mut client = client.lock().unwrap();
467465
get_binary(&mut client, &expr)
468466
};
469-
// dbg!(hex::encode(&ground_truth));
470467

471468
// Compare with ground truth, for float we allow tiny rounding error
472469
if ty == &Type::FLOAT4 {

0 commit comments

Comments
 (0)