Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bb3ebbf

Browse files
committed
Fix some warnings
1 parent 863a295 commit bb3ebbf

File tree

6 files changed

+137
-156
lines changed

6 files changed

+137
-156
lines changed

postgres-shared/src/types/bit_vec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use postgres_protocol::types;
44
use self::bit_vec::BitVec;
55
use std::error::Error;
66

7-
use types::{FromSql, ToSql, IsNull, Type, BIT, VARBIT};
7+
use types::{FromSql, IsNull, ToSql, Type, BIT, VARBIT};
88

99
impl FromSql for BitVec {
1010
fn from_sql(_: &Type, raw: &[u8]) -> Result<BitVec, Box<Error + Sync + Send>> {
@@ -21,7 +21,7 @@ impl FromSql for BitVec {
2121
}
2222

2323
impl ToSql for BitVec {
24-
fn to_sql(&self, _: &Type, mut out: &mut Vec<u8>) -> Result<IsNull, Box<Error + Sync + Send>> {
24+
fn to_sql(&self, _: &Type, out: &mut Vec<u8>) -> Result<IsNull, Box<Error + Sync + Send>> {
2525
types::varbit_to_sql(self.len(), self.to_bytes().into_iter(), out)?;
2626
Ok(IsNull::No)
2727
}

postgres-shared/src/types/chrono.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
extern crate chrono;
22

33
use postgres_protocol::types;
4-
use self::chrono::{Duration, NaiveDate, NaiveTime, NaiveDateTime, DateTime, Utc, Local,
5-
FixedOffset};
4+
use self::chrono::{DateTime, Duration, FixedOffset, Local, NaiveDate, NaiveDateTime, NaiveTime,
5+
Utc};
66
use std::error::Error;
77

8-
use types::{FromSql, ToSql, IsNull, Type, TIMESTAMP, TIMESTAMPTZ, DATE, TIME};
8+
use types::{FromSql, IsNull, ToSql, Type, DATE, TIME, TIMESTAMP, TIMESTAMPTZ};
99

1010
fn base() -> NaiveDateTime {
1111
NaiveDate::from_ymd(2000, 1, 1).and_hms(0, 0, 0)
@@ -62,11 +62,7 @@ impl FromSql for DateTime<Local> {
6262
}
6363

6464
impl ToSql for DateTime<Local> {
65-
fn to_sql(
66-
&self,
67-
type_: &Type,
68-
mut w: &mut Vec<u8>,
69-
) -> Result<IsNull, Box<Error + Sync + Send>> {
65+
fn to_sql(&self, type_: &Type, w: &mut Vec<u8>) -> Result<IsNull, Box<Error + Sync + Send>> {
7066
self.with_timezone(&Utc).to_sql(type_, w)
7167
}
7268

postgres-shared/src/types/rustc_serialize.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use self::rustc_serialize::json;
44
use std::io::{Read, Write};
55
use std::error::Error;
66

7-
use types::{FromSql, ToSql, IsNull, Type, JSON, JSONB};
7+
use types::{FromSql, IsNull, ToSql, Type, JSON, JSONB};
88

99
impl FromSql for json::Json {
1010
fn from_sql(ty: &Type, mut raw: &[u8]) -> Result<json::Json, Box<Error + Sync + Send>> {
@@ -23,7 +23,7 @@ impl FromSql for json::Json {
2323
}
2424

2525
impl ToSql for json::Json {
26-
fn to_sql(&self, ty: &Type, mut out: &mut Vec<u8>) -> Result<IsNull, Box<Error + Sync + Send>> {
26+
fn to_sql(&self, ty: &Type, out: &mut Vec<u8>) -> Result<IsNull, Box<Error + Sync + Send>> {
2727
if *ty == JSONB {
2828
out.push(1);
2929
}

tokio-postgres/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ tokio-dns-unofficial = "0.1"
4949
tokio-io = "0.1"
5050

5151
tokio-openssl = { version = "0.1", optional = true }
52-
openssl = { version = "0.9", optional = true }
52+
openssl = { version = "0.9.23", optional = true }
5353

5454
[target.'cfg(unix)'.dependencies]
5555
tokio-uds = "0.1"

0 commit comments

Comments
 (0)