Skip to content

Commit a38c55a

Browse files
committed
remove hex dep
1 parent 6b62974 commit a38c55a

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

Cargo.lock

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

iroh-base/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ serde = { version = "1", features = ["derive", "rc"] }
2525
n0-error = "0.1.0"
2626
zeroize = { version = "1.8.2", optional = true, features = ["derive"] }
2727
zeroize_derive = { version = "1.4.2", optional = true } # needed for minimal versions
28-
hex = "0.4.3"
2928

3029
[dev-dependencies]
3130
postcard = { version = "1", features = ["use-std"] }

iroh-base/src/endpoint_addr.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
99
use std::{collections::BTreeSet, fmt, net::SocketAddr};
1010

11+
use data_encoding::HEXLOWER;
1112
use serde::{Deserialize, Serialize};
1213

1314
use crate::{EndpointId, PublicKey, RelayUrl};
@@ -74,12 +75,12 @@ enum UserAddrBytes {
7475
impl fmt::Debug for UserAddrBytes {
7576
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7677
if !f.alternate() {
77-
write!(f, "[{}]", hex::encode(self.as_bytes()))
78+
write!(f, "[{}]", HEXLOWER.encode(self.as_bytes()))
7879
} else {
7980
let bytes = self.as_bytes();
8081
match self {
81-
Self::Inline { .. } => write!(f, "Inline[{}]", hex::encode(bytes)),
82-
Self::Heap(_) => write!(f, "Heap[{}]", hex::encode(bytes)),
82+
Self::Inline { .. } => write!(f, "Inline[{}]", HEXLOWER.encode(bytes)),
83+
Self::Heap(_) => write!(f, "Heap[{}]", HEXLOWER.encode(bytes)),
8384
}
8485
}
8586
}

0 commit comments

Comments
 (0)