Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc/multiaddr: Backport serde-related fix to v0.9 #1925

Merged
merged 2 commits into from
Jan 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions misc/multiaddr/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 0.9.7 [2021-01-14]

- Fix compilation with serde 1.0.119. See original
[PR 1912](https://github.com/libp2p/rust-libp2p/pull/1912).

# 0.9.6 [2020-11-17]

- Move the `from_url` module and functionality behind the `url` feature,
Expand Down
2 changes: 1 addition & 1 deletion misc/multiaddr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description = "Implementation of the multiaddr format"
homepage = "https://github.com/libp2p/rust-libp2p"
keywords = ["multiaddr", "ipfs"]
license = "MIT"
version = "0.9.6"
version = "0.9.7"

[features]
default = ["url"]
Expand Down
9 changes: 3 additions & 6 deletions misc/multiaddr/src/onion_addr.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use std::borrow::Cow;
use std::fmt::Debug;
use serde::export::Formatter;
use std::fmt;
use std::{borrow::Cow, fmt};

/// Represents an Onion v3 address
#[derive(Clone)]
Expand Down Expand Up @@ -44,8 +41,8 @@ impl<'a> From<(&'a [u8; 35], u16)> for Onion3Addr<'a> {
}
}

impl Debug for Onion3Addr<'_> {
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), fmt::Error> {
impl fmt::Debug for Onion3Addr<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
f.debug_tuple("Onion3Addr")
.field(&format!("{:02x?}", &self.0[..]))
.field(&self.1)
Expand Down