Skip to content

Commit 2f33e2a

Browse files
committed
Bump postgres version
1 parent 11921b8 commit 2f33e2a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repository = "https://github.com/sfackler/rust-postgres-array"
88
documentation = "https://sfackler.github.io/rust-postgres-array/doc/v0.5.2/postgres_array"
99

1010
[dependencies]
11-
postgres = ">= 0.9, < 0.11"
11+
postgres = "0.11"
1212
byteorder = ">= 0.3, < 0.5"
1313

1414
[dev-dependencies]

src/impls.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ impl<T> FromSql for Array<Option<T>> where T: FromSql {
2121
let _element_type: Oid = try!(raw.read_u32::<BigEndian>());
2222

2323
let mut dim_info = Vec::with_capacity(ndim);
24-
for _ in (0..ndim) {
24+
for _ in 0..ndim {
2525
dim_info.push(Dimension {
2626
len: try!(raw.read_u32::<BigEndian>()) as usize,
2727
lower_bound: try!(raw.read_i32::<BigEndian>()) as isize,
@@ -34,7 +34,7 @@ impl<T> FromSql for Array<Option<T>> where T: FromSql {
3434
};
3535

3636
let mut elements = Vec::with_capacity(nele);
37-
for _ in (0..nele) {
37+
for _ in 0..nele {
3838
let len = try!(raw.read_i32::<BigEndian>());
3939
if len < 0 {
4040
elements.push(None);
@@ -128,7 +128,7 @@ mod test {
128128
use Array;
129129

130130
fn test_type<T: PartialEq+FromSql+ToSql, S: fmt::Display>(sql_type: &str, checks: &[(T, S)]) {
131-
let conn = Connection::connect("postgres://postgres@localhost", &SslMode::None).unwrap();
131+
let conn = Connection::connect("postgres://postgres@localhost", SslMode::None).unwrap();
132132
for &(ref val, ref repr) in checks.iter() {
133133
let stmt = conn.prepare(&format!("SELECT {}::{}", *repr, sql_type)).unwrap();
134134
let result = stmt.query(&[]).unwrap().iter().next().unwrap().get(0);
@@ -224,7 +224,7 @@ mod test {
224224

225225
#[test]
226226
fn test_empty_array() {
227-
let conn = Connection::connect("postgres://postgres@localhost", &SslMode::None).unwrap();
227+
let conn = Connection::connect("postgres://postgres@localhost", SslMode::None).unwrap();
228228
let stmt = conn.prepare("SELECT '{}'::INT4[]").unwrap();
229229
stmt.query(&[]).unwrap().iter().next().unwrap().get::<_, Array<Option<i32>>>(0);
230230
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy