add copy function

This commit is contained in:
Ren Amamiya
2026-03-30 14:55:44 +07:00
parent 128f7a1242
commit aeb00a8d60
3 changed files with 64 additions and 26 deletions

View File

@@ -28,7 +28,7 @@ impl NewMessage {
/// Trash message.
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub struct FailedMessage {
pub raw_event: String,
pub raw_event: SharedString,
pub reason: SharedString,
}
@@ -38,7 +38,7 @@ impl FailedMessage {
T: Into<SharedString>,
{
Self {
raw_event: event.as_json(),
raw_event: SharedString::from(event.as_json()),
reason: reason.into(),
}
}