Automatic fixes by cargo-fix (#1662)

This commit is contained in:
Demi Obenour
2020-07-27 20:27:33 +00:00
committed by GitHub
parent 8a08f72e84
commit 9178459cc8
90 changed files with 309 additions and 309 deletions

View File

@ -481,7 +481,7 @@ where TBehaviour: NetworkBehaviour<ProtocolsHandler = THandler>,
/// Internal function used by everything event-related.
///
/// Polls the `Swarm` for the next event.
fn poll_next_event(mut self: Pin<&mut Self>, cx: &mut Context)
fn poll_next_event(mut self: Pin<&mut Self>, cx: &mut Context<'_>)
-> Poll<SwarmEvent<TBehaviour::OutEvent, THandleErr>>
{
// We use a `this` variable because the compiler can't mutably borrow multiple times
@ -779,7 +779,7 @@ enum PendingNotifyHandler {
fn notify_one<'a, TInEvent, TConnInfo, TPeerId>(
conn: &mut EstablishedConnection<'a, TInEvent, TConnInfo, TPeerId>,
event: TInEvent,
cx: &mut Context,
cx: &mut Context<'_>,
) -> Option<TInEvent>
where
TPeerId: Eq + std::hash::Hash + Clone,
@ -810,7 +810,7 @@ fn notify_any<'a, TTrans, TInEvent, TOutEvent, THandler, TConnInfo, TPeerId>(
ids: SmallVec<[ConnectionId; 10]>,
peer: &mut ConnectedPeer<'a, TTrans, TInEvent, TOutEvent, THandler, TConnInfo, TPeerId>,
event: TInEvent,
cx: &mut Context,
cx: &mut Context<'_>,
) -> Option<(TInEvent, SmallVec<[ConnectionId; 10]>)>
where
TTrans: Transport,
@ -859,7 +859,7 @@ fn notify_all<'a, TTrans, TInEvent, TOutEvent, THandler, TConnInfo, TPeerId>(
ids: SmallVec<[ConnectionId; 10]>,
peer: &mut ConnectedPeer<'a, TTrans, TInEvent, TOutEvent, THandler, TConnInfo, TPeerId>,
event: TInEvent,
cx: &mut Context,
cx: &mut Context<'_>,
) -> Option<(TInEvent, SmallVec<[ConnectionId; 10]>)>
where
TTrans: Transport,
@ -907,7 +907,7 @@ where TBehaviour: NetworkBehaviour<ProtocolsHandler = THandler>,
{
type Item = TBehaviour::OutEvent;
fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<Option<Self::Item>> {
fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
loop {
let event = futures::ready!(ExpandedSwarm::poll_next_event(self.as_mut(), cx));
if let SwarmEvent::Behaviour(event) = event {
@ -1178,7 +1178,7 @@ impl NetworkBehaviour for DummyBehaviour {
fn inject_event(&mut self, _: PeerId, _: ConnectionId,
_: <Self::ProtocolsHandler as ProtocolsHandler>::OutEvent) {}
fn poll(&mut self, _: &mut Context, _: &mut impl PollParameters) ->
fn poll(&mut self, _: &mut Context<'_>, _: &mut impl PollParameters) ->
Poll<NetworkBehaviourAction<<Self::ProtocolsHandler as
ProtocolsHandler>::InEvent, Self::OutEvent>>
{