diff --git a/CHANGELOG.md b/CHANGELOG.md index d57884f..0c15dd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- Remove unused `hex` dependencies which broke `no_std` ([#433]) + +[#433]: https://github.com/recmo/uint/pull/433 + ## [1.13.0] - 2025-02-18 - Support for borsh @ 1.5 ([#416]) diff --git a/Cargo.toml b/Cargo.toml index 01df7e5..c4a4c1b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -95,7 +95,6 @@ sqlx-core = { version = "0.8.2", optional = true } # borsh borsh = { version = "1.5", optional = true, default-features = false } -hex = "0.4" [dev-dependencies] ruint = { path = ".", features = ["arbitrary", "proptest"] } diff --git a/src/algorithms/gcd/matrix.rs b/src/algorithms/gcd/matrix.rs index 3d63736..34d42d0 100644 --- a/src/algorithms/gcd/matrix.rs +++ b/src/algorithms/gcd/matrix.rs @@ -188,7 +188,6 @@ impl Matrix { // Compute a2 let q = a0 / a1; - // dbg!(q); let mut a2 = a0 - q * a1; let mut k2 = k0 + q * k1; if a2 < LIMIT { @@ -205,7 +204,6 @@ impl Matrix { // Compute a3 let q = a1 / a2; - // dbg!(q); let mut a3 = a1 - q * a2; let mut k3 = k1 + q * k2; @@ -222,7 +220,6 @@ impl Matrix { debug_assert!(a2 < a3); debug_assert!(a2 > 0); let q = a3 / a2; - // dbg!(q); a3 -= q * a2; k3 += q * k2; if a3 < LIMIT { @@ -239,7 +236,6 @@ impl Matrix { debug_assert!(a2 < a3); debug_assert!(a2 > 0); let q = a3 / a2; - // dbg!(q); a3 -= q * a2; k3 += q * k2; } diff --git a/src/bits.rs b/src/bits.rs index f84cafe..206d7cd 100644 --- a/src/bits.rs +++ b/src/bits.rs @@ -819,7 +819,6 @@ mod tests { type U = Uint::; proptest!(|(value: U, shift in 0..=BITS + 2)| { let shifted = value.arithmetic_shr(shift); - // dbg!(value, shifted, shift); assert_eq!(shifted.leading_ones(), match value.leading_ones() { 0 => 0, n => min(BITS, n + shift) diff --git a/src/lib.rs b/src/lib.rs index 5cc19c9..a581c12 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,6 +22,7 @@ clippy::cast_lossless, )] #![cfg_attr(test, allow(clippy::wildcard_imports, clippy::cognitive_complexity))] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(not(feature = "std"), no_std)] // Unstable features #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/src/support/postgres.rs b/src/support/postgres.rs index 5855754..429e5fa 100644 --- a/src/support/postgres.rs +++ b/src/support/postgres.rs @@ -445,7 +445,6 @@ mod tests { if ty == &Type::FLOAT8 && f64::from(value).is_infinite() { return; } - // dbg!(hex::encode(&serialized)); // Fetch ground truth value from Postgres let expr = match *ty { @@ -461,12 +460,10 @@ mod tests { Type::JSON | Type::JSONB => format!("'\"{value:#x}\"'::{}", ty.name()), _ => format!("{value}::{}", ty.name()), }; - // dbg!(&expr); let ground_truth = { let mut client = client.lock().unwrap(); get_binary(&mut client, &expr) }; - // dbg!(hex::encode(&ground_truth)); // Compare with ground truth, for float we allow tiny rounding error if ty == &Type::FLOAT4 {