From 3597bc231028a1246724fbeaf538efb83240d1f5 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Wed, 8 Apr 2015 23:46:06 -0700 Subject: [PATCH] More cleanup --- src/message.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/message.rs b/src/message.rs index ff9e7841..0c75a686 100644 --- a/src/message.rs +++ b/src/message.rs @@ -162,12 +162,12 @@ impl WriteMessage for W { try!(buf.write_cstr(statement)); try!(buf.write_i16::(formats.len() as i16)); - for format in formats.iter() { - try!(buf.write_i16::(*format)); + for &format in formats { + try!(buf.write_i16::(format)); } try!(buf.write_i16::(values.len() as i16)); - for value in values.iter() { + for value in values { match *value { None => try!(buf.write_i32::(-1)), Some(ref value) => { @@ -178,8 +178,8 @@ impl WriteMessage for W { } try!(buf.write_i16::(result_formats.len() as i16)); - for format in result_formats.iter() { - try!(buf.write_i16::(*format)); + for &format in result_formats { + try!(buf.write_i16::(format)); } } CancelRequest { code, process_id, secret_key } => { @@ -216,8 +216,8 @@ impl WriteMessage for W { try!(buf.write_cstr(name)); try!(buf.write_cstr(query)); try!(buf.write_i16::(param_types.len() as i16)); - for ty in param_types.iter() { - try!(buf.write_u32::(*ty)); + for &ty in param_types { + try!(buf.write_u32::(ty)); } } PasswordMessage { password } => {