-
Notifications
You must be signed in to change notification settings - Fork 957
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
*: Fix clippy errors from upgrade to Rust 1.57 #2365
Merged
Merged
Conversation
This file contains 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
We need to keep this marker type to ensure that the type continues to be required to be pinned.
`false` is the default for `bool`, we can derive this.
These are already included the `RequestResponseMessage::Request` variant.
Tackling these suggestions would require performance measurement which we don't want to do at this stage.
mxinden
approved these changes
Dec 3, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @thomaseizinger!
canewsin
added a commit
to decentnetwork/rust-libp2p
that referenced
this pull request
Dec 7, 2021
* protocols/relay: Implement circuit relay v2 protocol This commit adds an implementation for the circuit relay v2 protocol to be used as a relay server, i.e. it supports incoming HOP requests and outgoing STOP requests. Future commits will add support for clients, i.e. outgoing HOP requests and incoming STOP requests. The existing circuit relay v1 protocol implementation is moved to protocols/relay/src/v1. * misc/multistream-select: Ignore simultaneous open 'iamclient' * protocols/relay: Ensure connections of HOP connect are kept alive * protocols/relay: Improve documentation * protocols/relay: Implement v2 client logic * protocols/relay: Handle dial failure * protocols/relay: Reuse connection * protocols/relay: Rename Connection to RelayedConnection * protocols/relay: Update transport doc examples * protocols/relay: Pass relay addr to transport * protocols/relay: Implement inbound stop denial * protocols/relay: Renew reservations * protocols/relay: Handle invalid expiration in the past * protocols/relay: Handle in and outbound failure * protocols/relay: Implement client handler keep alive * protocols/relay: Handle handler listener closed channel * protocols/relay: Handle handler to listener failure * protocols/relay: Return all new listener addresses * protocols/relay/v2: Update to latest protobuf definition * Revert "misc/multistream-select: Ignore simultaneous open 'iamclient'" This reverts commit 125e3c3. * protocols/relay/v2: Report back to transport * protocols/relay/v2: Disconnect when stop protocol not supported * protocols/relay/v2: Document max_duration not exceed u32::MAX * protocols/relay/v2: Don't append p2p-circuit as relay * protocols/relay/v2: Implement rate limiter * protocols/relay/v2: Document caveats on rate limiter with high volume * protocols/relay: Prevent possible false positive in quickcheck * protocols/relay: Reword Prost error message * protocols/relay: Allow users to specify generic rate limiters * protocols/relay: Move rate limiting logic into module * protocols/relay: Prevent reservation and connection over relayed conn * protocols/relay: Add circuit src rate limiting * protocols/relay/v2: Simplify example * protocols/relay: Add myself to authors * protocols/relay: Use thiserror * protocols/relay/v2: Set rate limits * protocols/relay: Use wasm_timer::Instant * protocols/relay/v2: Apply clippy suggestions * protocols/relay: Fix intra doc link * protocols/relay: Fix clippy warnings * misc/metrics: Add basic instrumentation for libp2p-relay * protocols/relay: Return NetworkBehaviourAction::NotifyHandler right away * protocols/relay: Run rust fmt * protocols/relay/src/v2/relay: Accept mutable config * protocols/relay/examples: Structure command line args - Allow deterministic peer identity. - Choose between ipv6 and ipv4. * .github/workflow: Use ubuntu-18.04 fixing missing protoc binary (libp2p#2368) `prost-build` is failing due to a missing `protoc` binary. Neither the OS supplies one, nor can the bundled binaries be used. This commit downgrades the OS used. The older OS is compatible with the bundled `protoc` binaries. * *: Fix clippy errors from upgrade to Rust 1.57 (libp2p#2365) * core: Mark "unused" field with "_" We need to keep this marker type to ensure that the type continues to be required to be pinned. * tranports/noise: Derive `Default` for `Config` `false` is the default for `bool`, we can derive this. * protocols/request-response: Remove unused fields These are already included the `RequestResponseMessage::Request` variant. * *: Allow clippy's large-enum-variant lint Tackling these suggestions would require performance measurement which we don't want to do at this stage. Co-authored-by: Max Inden <mail@max-inden.de> * protocols/mdns/: Generate peer expiry and fix IPv6 support (libp2p#2359) Co-authored-by: Victor Ermolaev <victorermolaev@gmail.com> Co-authored-by: Max Inden <mail@max-inden.de> * protocols/floodsub: Propagate messages only to target peers (libp2p#2360) Propagate messages only to the target peers and not all connected peers. Co-authored-by: Victor Ermolaev <victorermolaev@gmail.com> Co-authored-by: Max Inden <mail@max-inden.de> * examples/*: Migrate to async await (libp2p#2356) * Adapt examples to async style loop * Adapt async style loop for chat.rs * Adapt async style loop for distributed-key-value-store.rs * Adapt async style loop for gossibsub-chat.rs * Adapt async style loop for ipfs-private.rs * Adapt ping to use async * Update tutorial crate to reflect new changes Co-authored-by: Max Inden <mail@max-inden.de> * protocols/relay/src/v2/client: Return NetworkBehaviourAction on ListenReq * Refactor suggestion * protocols/relay/src/v2/client/handler: Check status of lend out substreams * protocols/relay/src/v2/client: Use void::Void for drop_notifer * protocols/relay/src/v2/client/handler: Log dropped oneshot Sender to transport * protocols/relay/src/v2/client/handler: Await send call to transport listener * protocols/relay/src/v2/client/handler: Remove unnecessary boxing Co-authored-by: Max Inden <mail@max-inden.de> Co-authored-by: ronzigelman <ronzigelman@gmail.com> Co-authored-by: Thomas Eizinger <thomas@eizinger.io> Co-authored-by: Victor Ermolaev <16148931+vnermolaev@users.noreply.github.com> Co-authored-by: Victor Ermolaev <victorermolaev@gmail.com> Co-authored-by: Gerardo Enrique Arriaga Rendon <53304516+JerryHue@users.noreply.github.com> Co-authored-by: Marco Munizaga <git@marcopolo.io>
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.
The newly released version of clippy is flagging several things.
This PR is an attempt to tackle these quickly to unblock CI for other PRs.