Remove testing code

This commit is contained in:
Vurich 2017-12-15 16:30:21 +01:00
parent 2d56f0eb42
commit 090e545f6f

View File

@ -95,7 +95,6 @@ pub fn dialer_select_proto_serial<'a, R, I, P>(
}) })
// Once read, analyze the response. // Once read, analyze the response.
.and_then(|(message, rest, proto_name, proto_value)| { .and_then(|(message, rest, proto_name, proto_value)| {
if message.is_none() { println!("empty"); }
let message = message.ok_or(ProtocolChoiceError::UnexpectedMessage)?; let message = message.ok_or(ProtocolChoiceError::UnexpectedMessage)?;
match message { match message {
@ -108,7 +107,7 @@ pub fn dialer_select_proto_serial<'a, R, I, P>(
ListenerToDialerMessage::NotAvailable => { ListenerToDialerMessage::NotAvailable => {
Ok(Loop::Continue(rest)) 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)| { .and_then(move |(msg, dialer)| {
let list = match msg { let list = match msg {
Some(ListenerToDialerMessage::ProtocolsListResponse { list }) => list, Some(ListenerToDialerMessage::ProtocolsListResponse { list }) => list,
_ => { println!("b {:?}", msg); return Err(ProtocolChoiceError::UnexpectedMessage) }, _ => return Err(ProtocolChoiceError::UnexpectedMessage),
}; };
let mut found = None; 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 => { Some(ListenerToDialerMessage::ProtocolAck { ref name }) if name == &proto_name => {
Ok((proto_val, dialer.into_inner())) Ok((proto_val, dialer.into_inner()))
} }
_ => { println!("a {:?}", msg); Err(ProtocolChoiceError::UnexpectedMessage) }, _ => Err(ProtocolChoiceError::UnexpectedMessage),
}); });
// The "Rust doesn't have impl Trait yet" tax. // The "Rust doesn't have impl Trait yet" tax.