Explain why implementing Debug for Response::Selected(...) is problematic
This commit is contained in:
parent
df108f581c
commit
83fd46b4f5
1 changed files with 3 additions and 4 deletions
|
|
@ -35,10 +35,9 @@ impl std::fmt::Debug for Response<'_> {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
|
||||||
use Response::*;
|
use Response::*;
|
||||||
match self {
|
match self {
|
||||||
Selected(_schema, _columns, _rows) =>
|
Selected(_schema, _columns, _rows) => {
|
||||||
// TODO: How can we iterate through the rows without having to take ownership of
|
// It seems that Rust requires ownership of rows to format them here.
|
||||||
// them?
|
// This is why we output the string below
|
||||||
{
|
|
||||||
f.write_str("Some rows... trust me")
|
f.write_str("Some rows... trust me")
|
||||||
}
|
}
|
||||||
Inserted => f.write_str("Inserted"),
|
Inserted => f.write_str("Inserted"),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue