Skip to content

Commit e7d4a7e

Browse files
committed
Drop dependency on debug builders
1 parent a2609f6 commit e7d4a7e

File tree

6 files changed

+8
-14
lines changed

6 files changed

+8
-14
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ phf_codegen = "0.7"
2626
[dependencies]
2727
bufstream = "0.1"
2828
byteorder = "0.3"
29-
debug-builders = "0.1"
3029
log = "0.3"
3130
phf = "0.7"
3231
rustc-serialize = "0.3"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ fn main() {
5757
```
5858

5959
## Requirements
60-
* **Rust** - Rust-Postgres is developed against the 1.0 release of Rust
60+
* **Rust** - Rust-Postgres is developed against the 1.2 release of Rust
6161
available on http://www.rust-lang.org. It should also compile against more
6262
recent releases.
6363

src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,9 @@ extern crate phf;
5252
extern crate rustc_serialize as serialize;
5353
#[cfg(feature = "unix_socket")]
5454
extern crate unix_socket;
55-
extern crate debug_builders;
5655

5756
use bufstream::BufStream;
5857
use md5::Md5;
59-
use debug_builders::DebugStruct;
6058
use std::ascii::AsciiExt;
6159
use std::borrow::ToOwned;
6260
use std::cell::{Cell, RefCell};
@@ -804,7 +802,7 @@ pub struct Connection {
804802
impl fmt::Debug for Connection {
805803
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
806804
let conn = self.conn.borrow();
807-
DebugStruct::new(fmt, "Connection")
805+
fmt.debug_struct("Connection")
808806
.field("cancel_data", &conn.cancel_data)
809807
.field("notifications", &conn.notifications.len())
810808
.field("transaction_depth", &conn.trans_depth)
@@ -1107,7 +1105,7 @@ pub struct Transaction<'conn> {
11071105

11081106
impl<'a> fmt::Debug for Transaction<'a> {
11091107
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
1110-
DebugStruct::new(fmt, "Transaction")
1108+
fmt.debug_struct("Transaction")
11111109
.field("commit", &self.commit.get())
11121110
.field("depth", &self.depth)
11131111
.finish()

src/notification.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//! Asynchronous notifications.
22
3-
use debug_builders::DebugStruct;
43
use std::fmt;
54

65
use {desynchronized, Result, Connection, NotificationsNew};
@@ -25,7 +24,7 @@ pub struct Notifications<'conn> {
2524

2625
impl<'a> fmt::Debug for Notifications<'a> {
2726
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
28-
DebugStruct::new(fmt, "Notifications")
27+
fmt.debug_struct("Notifications")
2928
.field("pending", &self.len())
3029
.finish()
3130
}

src/rows.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
use std::ascii::AsciiExt;
44
use std::fmt;
55
use std::collections::VecDeque;
6-
use debug_builders::DebugStruct;
76
use std::borrow::Cow;
87
use std::slice;
98
use std::vec;
@@ -38,7 +37,7 @@ impl<'a> RowsNew<'a> for Rows<'a> {
3837

3938
impl<'a> fmt::Debug for Rows<'a> {
4039
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
41-
DebugStruct::new(fmt, "Rows")
40+
fmt.debug_struct("Rows")
4241
.field("columns", &self.columns())
4342
.field("rows", &self.data.len())
4443
.finish()
@@ -178,7 +177,7 @@ pub struct Row<'a> {
178177

179178
impl<'a> fmt::Debug for Row<'a> {
180179
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
181-
DebugStruct::new(fmt, "Row")
180+
fmt.debug_struct("Row")
182181
.field("statement", self.stmt)
183182
.finish()
184183
}
@@ -327,7 +326,7 @@ impl<'a, 'b> Drop for LazyRows<'a, 'b> {
327326

328327
impl<'a, 'b> fmt::Debug for LazyRows<'a, 'b> {
329328
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
330-
DebugStruct::new(fmt, "LazyRows")
329+
fmt.debug_struct("LazyRows")
331330
.field("name", &self.name)
332331
.field("row_limit", &self.row_limit)
333332
.field("remaining_rows", &self.data.len())

src/stmt.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//! Prepared statements
22
3-
use debug_builders::DebugStruct;
43
use std::cell::{Cell, RefMut};
54
use std::collections::VecDeque;
65
use std::fmt;
@@ -28,7 +27,7 @@ pub struct Statement<'conn> {
2827

2928
impl<'a> fmt::Debug for Statement<'a> {
3029
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
31-
DebugStruct::new(fmt, "Statement")
30+
fmt.debug_struct("Statement")
3231
.field("name", &self.name)
3332
.field("parameter_types", &self.param_types)
3433
.field("columns", &self.columns)

0 commit comments

Comments
 (0)