refactor(examples): distributed-key-value-store identify and rendezvous#5571
Closed
P1R wants to merge 8 commits into
Closed
refactor(examples): distributed-key-value-store identify and rendezvous#5571P1R wants to merge 8 commits into
P1R wants to merge 8 commits into
Conversation
…remove unnecesary dependencies
…-store example and remove unnecesary dependencies
jxs
reviewed
Aug 28, 2024
Member
jxs
left a comment
There was a problem hiding this comment.
Hi David, and thanks for this! Overall looks good to me, can we separate this PR into one for each example? Thanks!
| swarm.behaviour_mut().kademlia.set_mode(Some(Mode::Server)); | ||
|
|
||
| // Read full lines from stdin | ||
| let mut stdin = io::BufReader::new(io::stdin()).lines().fuse(); |
Member
There was a problem hiding this comment.
can we keep std::futures::select! and therefore this fuse?
Contributor
Author
There was a problem hiding this comment.
@jxs i did as just line following other example implementations with tokios as the following:
chat/src/main.rs:88: let mut stdin = io::BufReader::new(io::stdin()).lines();
ipfs-private/src/main.rs:172: let mut stdin = io::BufReader::new(io::stdin()).lines();
but I can try your approach later tonight.
Contributor
Author
|
Sure, I will rewrite pull request for each example I forgot to ask that but I had it in mind. Thanks. |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Following on issue #4449
Refactor and cleanup on three examples:
refactor: use tokio instead of async-std in the distributed-key-value-store example and remove unnecesary dependencies
refactor: remove unnecesary dependencies rendezvous example (async-std)
refactor: use tokio instead of async-std in the identify example and remove unnecesary dependencies
Notes & open questions
Change checklist
Removed unecesary dependencies on examples/rendezvous/Cargo.toml and examples/identify/Cargo.toml
Changed async-std for tokio in examples/distributed-key-value-store/Cargo.toml and examples/identify/Cargo.toml