sfackler / rust-postgres

Native PostgreSQL driver for the Rust programming language
Apache License 2.0
3.44k stars 436 forks source link

Postgres 0.19.5: can't compile #1013

Closed rjzak closed 1 year ago

rjzak commented 1 year ago

I'm getting this error in CI, and on my workstation:

Compiling tokio-postgres v0.7.8
error[E0277]: `DataRowBody` doesn't implement `std::fmt::Debug`
Error:    --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-postgres-0.7.8/src/row.rs:202:5
    |
199 | #[derive(Debug)]
    |          ----- in this derive macro expansion
...
202 |     body: DataRowBody,
    |     ^^^^^^^^^^^^^^^^^ `DataRowBody` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
    |
    = help: the trait `std::fmt::Debug` is not implemented for `DataRowBody`
    = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

While DataRowBody does derive Debug, it has a member Bytes from Tokio https://github.com/tokio-rs/bytes/blob/master/src/bytes.rs#L100, which does not derive Debug, nor does Bytes implement Display.

sfackler commented 1 year ago

I messed up a dependency constraint - you should be good if you get a newer postgres-protocol with cargo update.

rjzak commented 1 year ago

Thanks!