diff --git a/sqlx-postgres/src/listener.rs b/sqlx-postgres/src/listener.rs index 9c439db854..1a84bd3d63 100644 --- a/sqlx-postgres/src/listener.rs +++ b/sqlx-postgres/src/listener.rs @@ -36,6 +36,7 @@ pub struct PgListener { } /// An asynchronous notification from Postgres. +#[derive(Clone)] pub struct PgNotification(Notification); impl PgListener { diff --git a/sqlx-postgres/src/message/notification.rs b/sqlx-postgres/src/message/notification.rs index 7bf029839c..8eafcc27f2 100644 --- a/sqlx-postgres/src/message/notification.rs +++ b/sqlx-postgres/src/message/notification.rs @@ -4,7 +4,7 @@ use crate::error::Error; use crate::io::BufExt; use crate::message::{BackendMessage, BackendMessageFormat}; -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct Notification { pub(crate) process_id: u32, pub(crate) channel: Bytes,