Commit a9e642e9 authored by xuwencheng's avatar xuwencheng

store

parent c64fe216
...@@ -13,7 +13,7 @@ pub trait BusinessEvent { ...@@ -13,7 +13,7 @@ pub trait BusinessEvent {
key: Option<impl AsRef<str>>, key: Option<impl AsRef<str>>,
header: Header, header: Header,
status: Status, status: Status,
extra: Option<impl AsRef<str>>, extra: impl AsRef<str>,
) -> SocketEvent; ) -> SocketEvent;
} }
...@@ -22,7 +22,7 @@ impl BusinessEvent for SocketEvent { ...@@ -22,7 +22,7 @@ impl BusinessEvent for SocketEvent {
key: Option<impl AsRef<str>>, key: Option<impl AsRef<str>>,
header: Header, header: Header,
status: Status, status: Status,
extra: Option<impl AsRef<str>>, extra: impl AsRef<str>,
) -> SocketEvent { ) -> SocketEvent {
let Header(msg_id, msg_ty, qos) = header; let Header(msg_id, msg_ty, qos) = header;
SocketEvent { SocketEvent {
...@@ -40,7 +40,7 @@ impl BusinessEvent for SocketEvent { ...@@ -40,7 +40,7 @@ impl BusinessEvent for SocketEvent {
msg_ty: Some(msg_ty), msg_ty: Some(msg_ty),
status: status as i32, status: status as i32,
desc: qos.desc(), desc: qos.desc(),
extra: extra.map(|s| s.as_ref().to_string()), extra: Some(extra.as_ref().to_string()),
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment