From 06b770917bf2b8c713a1f6de5d922435487f35b9 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Fri, 27 May 2016 12:35:00 +0200 Subject: [PATCH] address clippy and rust lints --- src/lib.rs | 2 +- src/md5.rs | 3 +-- src/priv_io.rs | 3 +-- src/rows.rs | 2 +- src/url.rs | 1 - 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index e1eab14d..a1e9e681 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -//! A pure-Rust frontend for the popular PostgreSQL database. +//! A pure-Rust frontend for the popular `PostgreSQL` database. //! //! ```rust,no_run //! extern crate postgres; diff --git a/src/md5.rs b/src/md5.rs index 59433d66..b3806d5b 100644 --- a/src/md5.rs +++ b/src/md5.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::io::prelude::*; use std::ptr; use std::mem; use std::ops::{Add, Range}; @@ -277,7 +276,7 @@ struct Md5State { } impl Md5State { - #[allow(new_without_default)] + #[allow(new_without_default_derive)] fn new() -> Md5State { Md5State { s0: 0x67452301, diff --git a/src/priv_io.rs b/src/priv_io.rs index 66f5d553..4d540682 100644 --- a/src/priv_io.rs +++ b/src/priv_io.rs @@ -1,5 +1,4 @@ use byteorder::ReadBytesExt; -use net2::TcpStreamExt; use std::error::Error; use std::io; use std::io::prelude::*; @@ -18,7 +17,7 @@ use std::os::windows::io::{AsRawSocket, RawSocket}; use {SslMode, ConnectParams, ConnectTarget}; use error::ConnectError; -use io::{NegotiateSsl, StreamWrapper}; +use io::StreamWrapper; use message::{self, WriteMessage}; use message::Frontend; diff --git a/src/rows.rs b/src/rows.rs index 9ae2c5de..79c39992 100644 --- a/src/rows.rs +++ b/src/rows.rs @@ -7,7 +7,7 @@ use std::fmt; use std::ops::Deref; use std::slice; -use {Result, Transaction, DbErrorNew, SessionInfoNew, RowsNew, LazyRowsNew, StatementInternals, +use {Result, Transaction, SessionInfoNew, RowsNew, LazyRowsNew, StatementInternals, WrongTypeNew}; use types::{FromSql, SessionInfo, WrongType}; use stmt::{Statement, Column}; diff --git a/src/url.rs b/src/url.rs index cd8c38ae..4c4048c2 100644 --- a/src/url.rs +++ b/src/url.rs @@ -7,7 +7,6 @@ // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::io::prelude::*; use std::str::FromStr; use hex::FromHex;