Simplified some matches to let statements.

This commit is contained in:
Aaron Weiss 2014-09-11 01:14:44 -04:00
parent 9b6919d0bc
commit 1833a0199c

View file

@ -12,13 +12,10 @@ pub fn connect(host: &str, port: u16) -> IoResult<Connection> {
}
fn send_internal(conn: &Connection, msg: &str) -> IoResult<()> {
match conn {
&Connection(ref tcp) => {
let mut writer = BufferedWriter::new(tcp.clone());
writer.write_str(msg);
writer.flush()
},
}
let &Connection(ref tcp) = conn;
let mut writer = BufferedWriter::new(tcp.clone());
writer.write_str(msg);
writer.flush()
}
pub struct Message<'a> {