Remove silly renamed import

This commit is contained in:
Steven Fackler 2016-09-21 22:16:38 -07:00
parent a6e60b23b1
commit da6ad2b821

View File

@ -54,7 +54,6 @@ extern crate postgres_protocol;
use std::cell::{Cell, RefCell};
use std::collections::{VecDeque, HashMap};
use std::fmt;
use std::io as std_io;
use std::io::prelude::*;
use std::mem;
use std::result;
@ -173,13 +172,13 @@ pub fn cancel_query<T>(params: T,
Ok(())
}
fn bad_response() -> std_io::Error {
std_io::Error::new(std_io::ErrorKind::InvalidInput,
fn bad_response() -> std::io::Error {
std::io::Error::new(std::io::ErrorKind::InvalidInput,
"the server returned an unexpected response")
}
fn desynchronized() -> std_io::Error {
std_io::Error::new(std_io::ErrorKind::Other,
fn desynchronized() -> std::io::Error {
std::io::Error::new(std::io::ErrorKind::Other,
"communication with the server has desynchronized due to an earlier IO \
error")
}
@ -294,7 +293,7 @@ impl InnerConnection {
Ok(conn)
}
fn read_message_with_notification(&mut self) -> std_io::Result<backend::Message> {
fn read_message_with_notification(&mut self) -> std::io::Result<backend::Message> {
debug_assert!(!self.desynchronized);
loop {
match try_desync!(self, self.stream.read_message()) {
@ -348,7 +347,7 @@ impl InnerConnection {
}
}
fn read_message(&mut self) -> std_io::Result<backend::Message> {
fn read_message(&mut self) -> std::io::Result<backend::Message> {
loop {
match try!(self.read_message_with_notification()) {
backend::Message::NotificationResponse { process_id, channel, payload } => {
@ -385,7 +384,7 @@ impl InnerConnection {
backend::Message::AuthenticationSCMCredential |
backend::Message::AuthenticationGSS |
backend::Message::AuthenticationSSPI => {
return Err(ConnectError::Io(std_io::Error::new(std_io::ErrorKind::Other,
return Err(ConnectError::Io(std::io::Error::new(std::io::ErrorKind::Other,
"unsupported authentication")))
}
backend::Message::ErrorResponse { fields } => return DbError::new_connect(fields),
@ -408,7 +407,7 @@ impl InnerConnection {
try!(self.stream.write_message(|buf| frontend::parse(stmt_name, query, None, buf)));
try!(self.stream.write_message(|buf| frontend::describe(b'S', stmt_name, buf)));
try!(self.stream.write_message(|buf| Ok::<(), std_io::Error>(frontend::sync(buf))));
try!(self.stream.write_message(|buf| Ok::<(), std::io::Error>(frontend::sync(buf))));
try!(self.stream.flush());
match try!(self.read_message()) {
@ -469,7 +468,7 @@ impl InnerConnection {
frontend::copy_fail("COPY queries cannot be directly executed", buf)
}));
try!(self.stream
.write_message(|buf| Ok::<(), std_io::Error>(frontend::sync(buf))));
.write_message(|buf| Ok::<(), std::io::Error>(frontend::sync(buf))));
try!(self.stream.flush());
}
backend::Message::CopyOutResponse { .. } => {
@ -478,7 +477,7 @@ impl InnerConnection {
break;
}
}
return Err(Error::Io(std_io::Error::new(std_io::ErrorKind::InvalidInput,
return Err(Error::Io(std::io::Error::new(std::io::ErrorKind::InvalidInput,
"COPY queries cannot be directly \
executed")));
}
@ -532,7 +531,7 @@ impl InnerConnection {
}
try!(self.stream.write_message(|buf| frontend::execute(portal_name, row_limit, buf)));
try!(self.stream.write_message(|buf| Ok::<(), std_io::Error>(frontend::sync(buf))));
try!(self.stream.write_message(|buf| Ok::<(), std::io::Error>(frontend::sync(buf))));
try!(self.stream.flush());
match try!(self.read_message()) {
@ -588,7 +587,7 @@ impl InnerConnection {
fn close_statement(&mut self, name: &str, type_: u8) -> Result<()> {
try!(self.stream.write_message(|buf| frontend::close(type_, name, buf)));
try!(self.stream.write_message(|buf| Ok::<(), std_io::Error>(frontend::sync(buf))));
try!(self.stream.write_message(|buf| Ok::<(), std::io::Error>(frontend::sync(buf))));
try!(self.stream.flush());
let resp = match try!(self.read_message()) {
backend::Message::CloseComplete => Ok(()),
@ -815,7 +814,7 @@ impl InnerConnection {
frontend::copy_fail("COPY queries cannot be directly executed", buf)
}));
try!(self.stream
.write_message(|buf| Ok::<(), std_io::Error>(frontend::sync(buf))));
.write_message(|buf| Ok::<(), std::io::Error>(frontend::sync(buf))));
try!(self.stream.flush());
}
backend::Message::ErrorResponse { fields } => {
@ -830,7 +829,7 @@ impl InnerConnection {
fn finish_inner(&mut self) -> Result<()> {
check_desync!(self);
try!(self.stream.write_message(|buf| Ok::<(), std_io::Error>(frontend::terminate(buf))));
try!(self.stream.write_message(|buf| Ok::<(), std::io::Error>(frontend::terminate(buf))));
try!(self.stream.flush());
Ok(())
}