forked from libp2p/rust-libp2p
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix tests and move tests::util::TestHandler to connection::util::Test…
…Handler
- Loading branch information
1 parent
16188bb
commit 40cdec3
Showing
8 changed files
with
98 additions
and
87 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
use std::{io, task::{Poll, Context}}; | ||
|
||
use multiaddr::Multiaddr; | ||
|
||
use crate::muxing::StreamMuxerBox; | ||
|
||
use super::{ConnectionHandler, Substream, SubstreamEndpoint, ConnectionHandlerEvent}; | ||
|
||
|
||
#[derive(Debug)] | ||
pub struct TestHandler(); | ||
|
||
impl ConnectionHandler for TestHandler { | ||
type InEvent = (); | ||
type OutEvent = (); | ||
type Error = io::Error; | ||
type Substream = Substream<StreamMuxerBox>; | ||
type OutboundOpenInfo = (); | ||
|
||
fn inject_substream( | ||
&mut self, | ||
_: Self::Substream, | ||
_: SubstreamEndpoint<Self::OutboundOpenInfo>, | ||
) { | ||
} | ||
|
||
fn inject_event(&mut self, _: Self::InEvent) {} | ||
|
||
fn inject_address_change(&mut self, _: &Multiaddr) {} | ||
|
||
fn poll( | ||
&mut self, | ||
_: &mut Context<'_>, | ||
) -> Poll<Result<ConnectionHandlerEvent<Self::OutboundOpenInfo, Self::OutEvent>, Self::Error>> | ||
{ | ||
Poll::Pending | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
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
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
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