This commit is contained in:
Steven Fackler 2015-12-25 20:20:28 -07:00
parent 4f37625cd6
commit f79e98e07a
3 changed files with 10 additions and 11 deletions

View File

@ -1337,8 +1337,8 @@ fn read_rows(conn: &mut InnerConnection, buf: &mut VecDeque<Vec<Option<Vec<u8>>>
}
}
return Err(Error::Io(std_io::Error::new(std_io::ErrorKind::InvalidInput,
"COPY queries cannot be directly \
executed")));
"COPY queries cannot be directly \
executed")));
}
_ => {
conn.desynchronized = true;

View File

@ -217,7 +217,7 @@ impl<'a> Row<'a> {
{
let idx = match idx.idx(self.stmt) {
Some(idx) => idx,
None => return None
None => return None,
};
let ty = self.stmt.columns()[idx].type_();

View File

@ -322,9 +322,9 @@ impl<'conn> Statement<'conn> {
match try!(conn.read_message()) {
ReadyForQuery { .. } => {
return Err(Error::Io(io::Error::new(io::ErrorKind::InvalidInput,
"called `copy_in` on a \
non-`COPY FROM STDIN` \
statement")));
"called `copy_in` on a \
non-`COPY FROM STDIN` \
statement")));
}
_ => {}
}
@ -422,8 +422,8 @@ impl<'conn> Statement<'conn> {
}
try!(conn.wait_for_ready());
return Err(Error::Io(io::Error::new(io::ErrorKind::InvalidInput,
"called `copy_out` on a non-`COPY TO \
STDOUT` statement")));
"called `copy_out` on a non-`COPY TO \
STDOUT` statement")));
}
ErrorResponse { fields } => {
try!(conn.wait_for_ready());
@ -434,9 +434,8 @@ impl<'conn> Statement<'conn> {
match try!(conn.read_message()) {
ReadyForQuery { .. } => {
return Err(Error::Io(io::Error::new(io::ErrorKind::InvalidInput,
"called `copy_out` on a \
non-`COPY TO STDOUT` \
statement")));
"called `copy_out` on a \
non-`COPY TO STDOUT` statement")));
}
_ => {}
}