Skip to content

Commit da6ad2b

Browse files
committed
Remove silly renamed import
1 parent a6e60b2 commit da6ad2b

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

src/lib.rs

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ extern crate postgres_protocol;
5454
use std::cell::{Cell, RefCell};
5555
use std::collections::{VecDeque, HashMap};
5656
use std::fmt;
57-
use std::io as std_io;
5857
use std::io::prelude::*;
5958
use std::mem;
6059
use std::result;
@@ -173,13 +172,13 @@ pub fn cancel_query<T>(params: T,
173172
Ok(())
174173
}
175174

176-
fn bad_response() -> std_io::Error {
177-
std_io::Error::new(std_io::ErrorKind::InvalidInput,
175+
fn bad_response() -> std::io::Error {
176+
std::io::Error::new(std::io::ErrorKind::InvalidInput,
178177
"the server returned an unexpected response")
179178
}
180179

181-
fn desynchronized() -> std_io::Error {
182-
std_io::Error::new(std_io::ErrorKind::Other,
180+
fn desynchronized() -> std::io::Error {
181+
std::io::Error::new(std::io::ErrorKind::Other,
183182
"communication with the server has desynchronized due to an earlier IO \
184183
error")
185184
}
@@ -294,7 +293,7 @@ impl InnerConnection {
294293
Ok(conn)
295294
}
296295

297-
fn read_message_with_notification(&mut self) -> std_io::Result<backend::Message> {
296+
fn read_message_with_notification(&mut self) -> std::io::Result<backend::Message> {
298297
debug_assert!(!self.desynchronized);
299298
loop {
300299
match try_desync!(self, self.stream.read_message()) {
@@ -348,7 +347,7 @@ impl InnerConnection {
348347
}
349348
}
350349

351-
fn read_message(&mut self) -> std_io::Result<backend::Message> {
350+
fn read_message(&mut self) -> std::io::Result<backend::Message> {
352351
loop {
353352
match try!(self.read_message_with_notification()) {
354353
backend::Message::NotificationResponse { process_id, channel, payload } => {
@@ -385,7 +384,7 @@ impl InnerConnection {
385384
backend::Message::AuthenticationSCMCredential |
386385
backend::Message::AuthenticationGSS |
387386
backend::Message::AuthenticationSSPI => {
388-
return Err(ConnectError::Io(std_io::Error::new(std_io::ErrorKind::Other,
387+
return Err(ConnectError::Io(std::io::Error::new(std::io::ErrorKind::Other,
389388
"unsupported authentication")))
390389
}
391390
backend::Message::ErrorResponse { fields } => return DbError::new_connect(fields),
@@ -408,7 +407,7 @@ impl InnerConnection {
408407

409408
try!(self.stream.write_message(|buf| frontend::parse(stmt_name, query, None, buf)));
410409
try!(self.stream.write_message(|buf| frontend::describe(b'S', stmt_name, buf)));
411-
try!(self.stream.write_message(|buf| Ok::<(), std_io::Error>(frontend::sync(buf))));
410+
try!(self.stream.write_message(|buf| Ok::<(), std::io::Error>(frontend::sync(buf))));
412411
try!(self.stream.flush());
413412

414413
match try!(self.read_message()) {
@@ -469,7 +468,7 @@ impl InnerConnection {
469468
frontend::copy_fail("COPY queries cannot be directly executed", buf)
470469
}));
471470
try!(self.stream
472-
.write_message(|buf| Ok::<(), std_io::Error>(frontend::sync(buf))));
471+
.write_message(|buf| Ok::<(), std::io::Error>(frontend::sync(buf))));
473472
try!(self.stream.flush());
474473
}
475474
backend::Message::CopyOutResponse { .. } => {
@@ -478,7 +477,7 @@ impl InnerConnection {
478477
break;
479478
}
480479
}
481-
return Err(Error::Io(std_io::Error::new(std_io::ErrorKind::InvalidInput,
480+
return Err(Error::Io(std::io::Error::new(std::io::ErrorKind::InvalidInput,
482481
"COPY queries cannot be directly \
483482
executed")));
484483
}
@@ -532,7 +531,7 @@ impl InnerConnection {
532531
}
533532

534533
try!(self.stream.write_message(|buf| frontend::execute(portal_name, row_limit, buf)));
535-
try!(self.stream.write_message(|buf| Ok::<(), std_io::Error>(frontend::sync(buf))));
534+
try!(self.stream.write_message(|buf| Ok::<(), std::io::Error>(frontend::sync(buf))));
536535
try!(self.stream.flush());
537536

538537
match try!(self.read_message()) {
@@ -588,7 +587,7 @@ impl InnerConnection {
588587

589588
fn close_statement(&mut self, name: &str, type_: u8) -> Result<()> {
590589
try!(self.stream.write_message(|buf| frontend::close(type_, name, buf)));
591-
try!(self.stream.write_message(|buf| Ok::<(), std_io::Error>(frontend::sync(buf))));
590+
try!(self.stream.write_message(|buf| Ok::<(), std::io::Error>(frontend::sync(buf))));
592591
try!(self.stream.flush());
593592
let resp = match try!(self.read_message()) {
594593
backend::Message::CloseComplete => Ok(()),
@@ -815,7 +814,7 @@ impl InnerConnection {
815814
frontend::copy_fail("COPY queries cannot be directly executed", buf)
816815
}));
817816
try!(self.stream
818-
.write_message(|buf| Ok::<(), std_io::Error>(frontend::sync(buf))));
817+
.write_message(|buf| Ok::<(), std::io::Error>(frontend::sync(buf))));
819818
try!(self.stream.flush());
820819
}
821820
backend::Message::ErrorResponse { fields } => {
@@ -830,7 +829,7 @@ impl InnerConnection {
830829

831830
fn finish_inner(&mut self) -> Result<()> {
832831
check_desync!(self);
833-
try!(self.stream.write_message(|buf| Ok::<(), std_io::Error>(frontend::terminate(buf))));
832+
try!(self.stream.write_message(|buf| Ok::<(), std::io::Error>(frontend::terminate(buf))));
834833
try!(self.stream.flush());
835834
Ok(())
836835
}

0 commit comments

Comments
 (0)