diff --git a/src/lib.rs b/src/lib.rs index 84a2d86..2e5c528 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,13 +12,10 @@ pub fn connect(host: &str, port: u16) -> IoResult { } 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> {