Skip to content

Commit 6c24a03

Browse files
committed
Drop debug_builders feature
1 parent 97ed6f0 commit 6c24a03

2 files changed

Lines changed: 15 additions & 21 deletions

File tree

Cargo.toml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,10 @@ openssl = "0.5"
2929
log = "0.3"
3030
rustc-serialize = "0.3"
3131
byteorder = "0.3"
32-
33-
[dependencies.uuid]
34-
optional = true
35-
version = "0.1"
36-
37-
[dependencies.unix_socket]
38-
optional = true
39-
version = "0.2"
40-
41-
[dependencies.time]
42-
optional = true
43-
version = "0.1.14"
32+
debug-builders = "0.1"
33+
uuid = { version = "0.1", optional = true }
34+
unix_socket = { version = "0.2", optional = true }
35+
time = { version = "0.1.14", optional = true }
4436

4537
[dev-dependencies]
4638
url = "0.2"

src/lib.rs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
//! }
4444
//! ```
4545
#![doc(html_root_url="https://sfackler.github.io/rust-postgres/doc")]
46-
#![feature(unsafe_destructor, io, core, debug_builders, str_char)]
46+
#![feature(unsafe_destructor, io, core, str_char)]
4747
#![cfg_attr(feature = "unix_socket", feature(convert))]
4848
#![warn(missing_docs)]
4949

@@ -55,7 +55,9 @@ extern crate phf;
5555
extern crate rustc_serialize as serialize;
5656
#[cfg(feature = "unix_socket")]
5757
extern crate unix_socket;
58+
extern crate debug_builders;
5859

60+
use debug_builders::DebugStruct;
5961
use openssl::crypto::hash::{self, Hasher};
6062
use openssl::ssl::{SslContext, MaybeSslStream};
6163
use serialize::hex::ToHex;
@@ -249,7 +251,7 @@ pub struct Notifications<'conn> {
249251

250252
impl<'a> fmt::Debug for Notifications<'a> {
251253
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
252-
fmt.debug_struct("Notifications")
254+
DebugStruct::new(fmt, "Notifications")
253255
.field("pending", &self.conn.conn.borrow().notifications.len())
254256
.finish()
255257
}
@@ -876,7 +878,7 @@ pub struct Connection {
876878
impl fmt::Debug for Connection {
877879
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
878880
let conn = self.conn.borrow();
879-
fmt.debug_struct("Connection")
881+
DebugStruct::new(fmt, "Connection")
880882
.field("cancel_data", &conn.cancel_data)
881883
.field("notifications", &conn.notifications.len())
882884
.field("transaction_depth", &conn.trans_depth)
@@ -1189,7 +1191,7 @@ pub struct Transaction<'conn> {
11891191

11901192
impl<'a> fmt::Debug for Transaction<'a> {
11911193
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
1192-
fmt.debug_struct("Transaction")
1194+
DebugStruct::new(fmt, "Transaction")
11931195
.field("commit", &self.commit.get())
11941196
.field("depth", &self.depth)
11951197
.finish()
@@ -1320,7 +1322,7 @@ pub struct Statement<'conn> {
13201322

13211323
impl<'a> fmt::Debug for Statement<'a> {
13221324
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
1323-
fmt.debug_struct("Statement")
1325+
DebugStruct::new(fmt, "Statement")
13241326
.field("name", &self.name)
13251327
.field("parameter_types", &self.param_types)
13261328
.field("columns", &self.columns)
@@ -1625,7 +1627,7 @@ pub struct Rows<'stmt> {
16251627

16261628
impl<'a> fmt::Debug for Rows<'a> {
16271629
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
1628-
fmt.debug_struct("Rows")
1630+
DebugStruct::new(fmt, "Rows")
16291631
.field("columns", &self.columns())
16301632
.field("rows", &self.data.len())
16311633
.finish()
@@ -1768,7 +1770,7 @@ pub struct Row<'a> {
17681770

17691771
impl<'a> fmt::Debug for Row<'a> {
17701772
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
1771-
fmt.debug_struct("Row")
1773+
DebugStruct::new(fmt, "Row")
17721774
.field("statement", self.stmt)
17731775
.finish()
17741776
}
@@ -1889,7 +1891,7 @@ impl<'a, 'b> Drop for LazyRows<'a, 'b> {
18891891

18901892
impl<'a, 'b> fmt::Debug for LazyRows<'a, 'b> {
18911893
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
1892-
fmt.debug_struct("LazyRows")
1894+
DebugStruct::new(fmt, "LazyRows")
18931895
.field("name", &self.name)
18941896
.field("row_limit", &self.row_limit)
18951897
.field("remaining_rows", &self.data.len())
@@ -1970,7 +1972,7 @@ pub struct CopyInStatement<'a> {
19701972

19711973
impl<'a> fmt::Debug for CopyInStatement<'a> {
19721974
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
1973-
fmt.debug_struct("CopyInStatement")
1975+
DebugStruct::new(fmt, "CopyInStatement")
19741976
.field("name", &self.name)
19751977
.field("column_types", &self.column_types)
19761978
.finish()

0 commit comments

Comments
 (0)