Skip to content

Commit a3ea1d4

Browse files
committed
refactor: Encode PeerId directly to string
1 parent c0dfe19 commit a3ea1d4

File tree

1 file changed

+1
-1
lines changed
  • crates/libtortillas/src/peer

1 file changed

+1
-1
lines changed

crates/libtortillas/src/peer/id.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ impl fmt::Display for PeerId {
414414
"{} {} ({})",
415415
self.client_name(),
416416
version,
417-
hex::encode(self.id())
417+
String::from_utf8_lossy(self.id())
418418
)
419419
} else {
420420
write!(f, "{} ({})", self.client_name(), hex::encode(self.id()))

0 commit comments

Comments
 (0)