From 014e740ae5c3c4bcb6bfae8b8790eb4e73be9f32 Mon Sep 17 00:00:00 2001 From: Nikhil Benesch Date: Wed, 6 Jan 2021 01:06:33 -0500 Subject: [PATCH 1/5] Upgrade to new postgres version --- Cargo.toml | 8 ++++---- circle.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ed1be43..e0e9682 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,10 +8,10 @@ description = "Array support for rust-postgres" repository = "https://github.com/sfackler/rust-postgres-array" [dependencies] -bytes = "0.5" +bytes = "1.0" fallible-iterator = "0.2" -postgres-types = "0.1" -postgres-protocol = "0.5" +postgres-types = "0.2" +postgres-protocol = "0.6" [dev-dependencies] -postgres = "0.17" +postgres = "0.19" diff --git a/circle.yml b/circle.yml index 290a005..23f9e02 100644 --- a/circle.yml +++ b/circle.yml @@ -2,7 +2,7 @@ version: 2 jobs: build: docker: - - image: rust:1.40.0 + - image: rust:1.45.0 - image: postgres:12 environment: POSTGRES_PASSWORD: password From fd0cac7df5e46dbe4e1364eebf28627e1a028353 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Wed, 6 Jan 2021 08:08:19 -0500 Subject: [PATCH 2/5] Release v0.11.0 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index e0e9682..c03eb0d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "postgres_array" -version = "0.10.0" +version = "0.11.0" authors = ["Steven Fackler "] edition = "2018" license = "MIT" From 00c305670b5537e0109547ab969d3e23fa8216d7 Mon Sep 17 00:00:00 2001 From: Joseph Koshakow Date: Thu, 13 Oct 2022 18:43:27 -0400 Subject: [PATCH 3/5] Fix display for 0 dimensional arrays --- src/array.rs | 4 ++++ src/lib.rs | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/array.rs b/src/array.rs index 3c030aa..9886d8d 100644 --- a/src/array.rs +++ b/src/array.rs @@ -39,6 +39,10 @@ where I: Iterator, T: 'a + fmt::Display, { + if dims.len() == 0 { + return write!(fmt, "{{}}"); + } + if depth == dims.len() { return write!(fmt, "{}", data.next().unwrap()); } diff --git a/src/lib.rs b/src/lib.rs index a326a53..21240da 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -146,5 +146,8 @@ mod tests { a.push(Array::from_vec(vec![4, 5, 6], 3)); a.wrap(1); assert_eq!("[1:1][-2:-1][3:5]={{{1,2,3},{4,5,6}}}", &format!("{}", a)); + + let a: Array = Array::from_parts(vec![], vec![]); + assert_eq!("{}", &format!("{}", a)); } } From 830bd609dda5a0d7e49256e2d059a9a6a2fedd4e Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sun, 16 Oct 2022 20:55:41 -0400 Subject: [PATCH 4/5] bump ci version --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 23f9e02..8e1b563 100644 --- a/circle.yml +++ b/circle.yml @@ -2,7 +2,7 @@ version: 2 jobs: build: docker: - - image: rust:1.45.0 + - image: rust:1.64.0 - image: postgres:12 environment: POSTGRES_PASSWORD: password From a3b83ff88e848167364c0c797af9e9c487b7ed95 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sun, 16 Oct 2022 20:59:08 -0400 Subject: [PATCH 5/5] Release v0.11.1 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index c03eb0d..5fa0f65 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "postgres_array" -version = "0.11.0" +version = "0.11.1" authors = ["Steven Fackler "] edition = "2018" license = "MIT"