mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-01 04:01:20 +00:00
Remove testing code
This commit is contained in:
parent
2d56f0eb42
commit
090e545f6f
@ -95,7 +95,6 @@ pub fn dialer_select_proto_serial<'a, R, I, P>(
|
||||
})
|
||||
// Once read, analyze the response.
|
||||
.and_then(|(message, rest, proto_name, proto_value)| {
|
||||
if message.is_none() { println!("empty"); }
|
||||
let message = message.ok_or(ProtocolChoiceError::UnexpectedMessage)?;
|
||||
|
||||
match message {
|
||||
@ -108,7 +107,7 @@ pub fn dialer_select_proto_serial<'a, R, I, P>(
|
||||
ListenerToDialerMessage::NotAvailable => {
|
||||
Ok(Loop::Continue(rest))
|
||||
},
|
||||
_ => { println!("c {:?}", message); Err(ProtocolChoiceError::UnexpectedMessage) }
|
||||
_ => Err(ProtocolChoiceError::UnexpectedMessage),
|
||||
}
|
||||
})
|
||||
})
|
||||
@ -141,7 +140,7 @@ pub fn dialer_select_proto_parallel<'a, R, I, M, P>(
|
||||
.and_then(move |(msg, dialer)| {
|
||||
let list = match msg {
|
||||
Some(ListenerToDialerMessage::ProtocolsListResponse { list }) => list,
|
||||
_ => { println!("b {:?}", msg); return Err(ProtocolChoiceError::UnexpectedMessage) },
|
||||
_ => return Err(ProtocolChoiceError::UnexpectedMessage),
|
||||
};
|
||||
|
||||
let mut found = None;
|
||||
@ -175,7 +174,7 @@ pub fn dialer_select_proto_parallel<'a, R, I, M, P>(
|
||||
Some(ListenerToDialerMessage::ProtocolAck { ref name }) if name == &proto_name => {
|
||||
Ok((proto_val, dialer.into_inner()))
|
||||
}
|
||||
_ => { println!("a {:?}", msg); Err(ProtocolChoiceError::UnexpectedMessage) },
|
||||
_ => Err(ProtocolChoiceError::UnexpectedMessage),
|
||||
});
|
||||
|
||||
// The "Rust doesn't have impl Trait yet" tax.
|
||||
|
Loading…
x
Reference in New Issue
Block a user