From 27df21d3eadd6c28b7775e5b1a0a57e89b6b1d8b Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 31 Oct 2026 05:22:02 +0100 Subject: unify hex builders --- src/swarm/auth.rs | 2 +- src/swarm/topology/tests.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/swarm') diff --git a/src/swarm/auth.rs b/src/swarm/auth.rs index 088f615..50e2fae 100644 --- a/src/swarm/auth.rs +++ b/src/swarm/auth.rs @@ -172,7 +172,7 @@ mod tests { use super::*; fn hex(bytes: &[u8]) -> String { - bytes.iter().map(|byte| format!("{byte:02x}")).collect() + crate::transport::Hex(bytes).to_string() } #[test] diff --git a/src/swarm/topology/tests.rs b/src/swarm/topology/tests.rs index d1b755f..d3a3e38 100644 --- a/src/swarm/topology/tests.rs +++ b/src/swarm/topology/tests.rs @@ -49,7 +49,7 @@ fn edges(graph: &BTreeMap>) -> BTreeSet<(String, String } fn hex(bytes: [u8; 32]) -> String { - bytes.iter().map(|byte| format!("{byte:02x}")).collect() + crate::transport::Hex(&bytes).to_string() } /// Over random swarms (size, `k`, who is reachable, who is stable): links only -- cgit v1.3.1