rs-ipfs / rust-ipfs

The InterPlanetary File System (IPFS), implemented in Rust.
Apache License 2.0
1.26k stars 163 forks source link

Swarm cleanup following libp2p upgrade to v0.39.1 #473

Closed CHr15F0x closed 3 years ago

CHr15F0x commented 3 years ago

This is a follow up of https://github.com/rs-ipfs/rust-ipfs/pull/472. There are two changes introduced:

The former (https://github.com/rs-ipfs/rust-ipfs/commit/136496f7de57d72782cf4c06108733321b05e9fc) works fine without the latter (https://github.com/rs-ipfs/rust-ipfs/commit/3b6f69530f633a9db4545fffe4b054dc69a760fc), however I am leaning more towards keeping both changes. Encoding the information about peer id presence/absence in Multiaddr in type instead of relying on comments and expect()s improves readability and developer experience.

Please let me know what your thoughts are.

mxinden commented 3 years ago

I am leaning more towards keeping both changes. Encoding the information about peer id presence/absence in Multiaddr in type instead of relying on comments and expect()s improves readability and developer experience.

:+1:

I think it is even worth exploring including the change above (and thus enforcing more than just multiaddr syntax at the type level) in https://github.com/multiformats/rust-multiaddr directly.

bors[bot] commented 3 years ago

Build succeeded: