Remove unneccesary None qualification

This commit is contained in:
Steven Fackler 2014-11-20 21:48:05 -08:00
parent a46c524200
commit 1882d878ad

View File

@ -343,7 +343,7 @@ impl InnerConnection {
options.push(("user".into_string(), user.user.clone())); options.push(("user".into_string(), user.user.clone()));
match database { match database {
Some(database) => options.push(("database".into_string(), database)), Some(database) => options.push(("database".into_string(), database)),
Option::None => {} None => {}
} }
try!(conn.write_messages(&[StartupMessage { try!(conn.write_messages(&[StartupMessage {
@ -1363,7 +1363,7 @@ impl<'stmt> Iterator<Row<'stmt>> for Rows<'stmt> {
fn size_hint(&self) -> (uint, Option<uint>) { fn size_hint(&self) -> (uint, Option<uint>) {
let lower = self.data.len(); let lower = self.data.len();
let upper = if self.more_rows { let upper = if self.more_rows {
Option::None None
} else { } else {
Some(lower) Some(lower)
}; };
@ -1436,7 +1436,7 @@ impl RowIndex for uint {
#[inline] #[inline]
fn idx(&self, stmt: &Statement) -> Option<uint> { fn idx(&self, stmt: &Statement) -> Option<uint> {
if *self > stmt.result_desc.len() { if *self > stmt.result_desc.len() {
Option::None None
} else { } else {
Some(*self) Some(*self)
} }
@ -1562,7 +1562,7 @@ impl<'a> CopyInStatement<'a> {
match (row.next(), types.next()) { match (row.next(), types.next()) {
(Some(val), Some(ty)) => { (Some(val), Some(ty)) => {
match val.to_sql(ty) { match val.to_sql(ty) {
Ok(Option::None) => { Ok(None) => {
let _ = buf.write_be_i32(-1); let _ = buf.write_be_i32(-1);
} }
Ok(Some(val)) => { Ok(Some(val)) => {
@ -1579,14 +1579,14 @@ impl<'a> CopyInStatement<'a> {
} }
} }
} }
(Some(_), Option::None) | (Option::None, Some(_)) => { (Some(_), None) | (None, Some(_)) => {
try_desync!(conn, conn.stream.write_message( try_desync!(conn, conn.stream.write_message(
&CopyFail { &CopyFail {
message: "Invalid column count", message: "Invalid column count",
})); }));
break 'l; break 'l;
} }
(Option::None, Option::None) => break (None, None) => break
} }
} }