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

src/lib: Add Multiaddr::protocol_stack #60

Merged
merged 10 commits into from
Oct 24, 2022

Conversation

John-LittleBearLabs
Copy link
Contributor

A convenience for cases where which protocols is of concern but the specific addresses are not, for example libp2p/rust-libp2p#2758

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tackling this!

src/protocol.rs Show resolved Hide resolved
Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the follow-up!

Can you include a CHANGELOG.md entry?

.gitignore Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the help here!

src/lib.rs Outdated Show resolved Hide resolved
@mxinden
Copy link
Member

mxinden commented Oct 19, 2022

Can you address the CI failures @John-LittleBearLabs?

error: single-character string constant used as pattern
Error:    --> tests/lib.rs:592:50
    |
592 |         let mut toks: Vec<&str> = addr_str.split("/").collect();
    |                                                  ^^^ help: try using a `char` instead: `'/'`
    |
    = note: `-D clippy::single-char-pattern` implied by `-D warnings`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern

error: could not compile `multiaddr` due to previous error
Error: The process '/home/runner/.cargo/bin/cargo' failed with exit code 101

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the follow-up. One more step needed. Again, sorry for the inconvenience.

CHANGELOG.md Outdated
@@ -7,6 +7,8 @@

- Use `multibase` instead of `bs58` for base58 encoding. See [PR 56].

- Create `protocol_stack` for Multiaddr. See [PR 60]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multiaddr v0.15.0 just released, thus this needs to be moved to a new section for v0.16.0 and the Cargo.toml in this project needs to be bumped.

Sorry for the inconvenience @John-LittleBearLabs.

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/protocol.rs Outdated Show resolved Hide resolved
@mxinden mxinden changed the title Providing convenient access to the static components only src/lib: Add Multiaddr::protocol_stack Oct 24, 2022
@mxinden mxinden merged commit 1cfb923 into multiformats:master Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants