Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/sync_connection_wrapper/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ fn from_tokio_join_error(join_error: JoinError) -> diesel::result::Error {
/// # some_async_fn().await;
/// # }
/// ```
#[derive(Debug)]
pub struct SyncConnectionWrapper<C> {
inner: Arc<Mutex<C>>,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting this PR.
Can you explain why this would be actual helpful for your use-case as #[derive(Debug)] only implements Debug if all generic parameters (in this case C) implements Debug on their own. I think all of the possible types for C (especially the SqliteConnection type) do not implement Debug on their own, so this won't actually be used at all.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a first step. I think need to work on e.g. SqliteConnection.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I had that discussion already a few times: The connection types do not implement Debug because there is nothing you can reasonably show there. They only hold a few opaque pointers to c objects. We also do not want to store the database URL in their as that could leak confidential information (login credentials, etc).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. I will close this PR then.

}
Expand Down
Loading