Skip to content

Commit 1e55b21

Browse files
committed
Merge branch 'release-v0.5.2' into release
2 parents 764f266 + 9ef00d3 commit 1e55b21

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[package]
22
name = "postgres_array"
3-
version = "0.5.1"
3+
version = "0.5.2"
44
authors = ["Steven Fackler <sfackler@gmail.com>"]
55
license = "MIT"
66
description = "Array support for rust-postgres"
77
repository = "https://github.com/sfackler/rust-postgres-array"
8-
documentation = "https://sfackler.github.io/rust-postgres-array/doc/v0.5.1/postgres_array"
8+
documentation = "https://sfackler.github.io/rust-postgres-array/doc/v0.5.2/postgres_array"
99

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

1414
[dev-dependencies]
1515
rustc-serialize = "0.3"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# rust-postgres-array
22
[![Build Status](https://travis-ci.org/sfackler/rust-postgres-array.svg?branch=master)](https://travis-ci.org/sfackler/rust-postgres-array)
33

4-
Support for PostgreSQL arrays in [rust-postgres](https://github.com/sfackler/rust-postgres).
4+
[Documentation](https://sfackler.github.io/rust-postgres-array/doc/v0.5.2/postgres_array)
55

6-
Documentation is available at https://sfackler.github.io/rust-postgres-array/doc/v0.5.1/postgres_array.
6+
Support for PostgreSQL arrays in [rust-postgres](https://github.com/sfackler/rust-postgres).

src/array.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ use std::fmt;
66
use Dimension;
77

88
/// A multi-dimensional array.
9-
#[derive(PartialEq, Eq, Clone)]
9+
#[derive(Debug, PartialEq, Eq, Clone)]
1010
pub struct Array<T> {
1111
dims: Vec<Dimension>,
1212
data: Vec<T>,
1313
}
1414

15-
impl<T: fmt::Debug> fmt::Debug for Array<T> {
15+
impl<T: fmt::Display> fmt::Display for Array<T> {
1616
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
1717
if self.dims.iter().any(|dim| dim.lower_bound != 1) {
1818
for dim in &self.dims {
@@ -30,9 +30,9 @@ fn fmt_helper<'a, T, I>(depth: usize,
3030
mut data: &mut I,
3131
fmt: &mut fmt::Formatter)
3232
-> fmt::Result
33-
where I: Iterator<Item=&'a T>, T: 'a+fmt::Debug {
33+
where I: Iterator<Item=&'a T>, T: 'a + fmt::Display {
3434
if depth == dims.len() {
35-
return write!(fmt, "{:?}", data.next().unwrap());
35+
return write!(fmt, "{}", data.next().unwrap());
3636
}
3737

3838
try!(write!(fmt, "{{"));
@@ -262,7 +262,7 @@ impl<T> IntoIterator for Array<T> {
262262
}
263263
}
264264

265-
/// An iterator over references to values of an `ArrayBase` in the
265+
/// An iterator over references to values of an `Array` in the
266266
/// higher-dimensional equivalent of row-major order.
267267
pub struct Iter<'a, T: 'a> {
268268
inner: slice::Iter<'a, T>,
@@ -282,7 +282,7 @@ impl<'a, T: 'a> DoubleEndedIterator for Iter<'a, T> {
282282
}
283283
}
284284

285-
/// An iterator over mutable references to values of an `ArrayBase` in the
285+
/// An iterator over mutable references to values of an `Array` in the
286286
/// higher-dimensional equivalent of row-major order.
287287
pub struct IterMut<'a, T: 'a> {
288288
inner: slice::IterMut<'a, T>,
@@ -302,7 +302,7 @@ impl<'a, T: 'a> DoubleEndedIterator for IterMut<'a, T> {
302302
}
303303
}
304304

305-
/// An iterator over values of an `ArrayBase` in the higher-dimensional
305+
/// An iterator over values of an `Array` in the higher-dimensional
306306
/// equivalent of row-major order.
307307
pub struct IntoIter<T> {
308308
inner: vec::IntoIter<T>,

src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Multi-dimensional arrays with per-dimension specifiable lower bounds
2-
#![doc(html_root_url="https://sfackler.github.io/rust-postgres-array/doc/v0.5.1")]
2+
#![doc(html_root_url="https://sfackler.github.io/rust-postgres-array/doc/v0.5.2")]
33

44
#[macro_use(to_sql_checked)]
55
extern crate postgres;
@@ -120,17 +120,17 @@ mod tests {
120120
}
121121

122122
#[test]
123-
fn test_debug() {
123+
fn test_display() {
124124
let a = Array::from_vec(vec![0i32, 1, 2, 3, 4], 1);
125-
assert_eq!("{0,1,2,3,4}", &format!("{:?}", a));
125+
assert_eq!("{0,1,2,3,4}", &format!("{}", a));
126126

127127
let a = Array::from_vec(vec![0i32, 1, 2, 3, 4], -3);
128-
assert_eq!("[-3:1]={0,1,2,3,4}", &format!("{:?}", a));
128+
assert_eq!("[-3:1]={0,1,2,3,4}", &format!("{}", a));
129129

130130
let mut a = Array::from_vec(vec![1i32, 2, 3], 3);
131131
a.wrap(-2);
132132
a.push(Array::from_vec(vec![4, 5, 6], 3));
133133
a.wrap(1);
134-
assert_eq!("[1:1][-2:-1][3:5]={{{1,2,3},{4,5,6}}}", &format!("{:?}", a));
134+
assert_eq!("[1:1][-2:-1][3:5]={{{1,2,3},{4,5,6}}}", &format!("{}", a));
135135
}
136136
}

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