Skip to content

Commit b27b49d

Browse files
sqlx-postgres: Make PgNotification struct clone (#4228)
1 parent 4249cb4 commit b27b49d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

sqlx-postgres/src/listener.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ pub struct PgListener {
3636
}
3737

3838
/// An asynchronous notification from Postgres.
39+
#[derive(Clone)]
3940
pub struct PgNotification(Notification);
4041

4142
impl PgListener {

sqlx-postgres/src/message/notification.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::error::Error;
44
use crate::io::BufExt;
55
use crate::message::{BackendMessage, BackendMessageFormat};
66

7-
#[derive(Debug)]
7+
#[derive(Debug, Clone)]
88
pub struct Notification {
99
pub(crate) process_id: u32,
1010
pub(crate) channel: Bytes,

0 commit comments

Comments
 (0)