Refactored the "helpers" so that they use a common Codec trait; this makes them composable as well.
This commit is contained in:
parent
e36b8d4fb9
commit
18cb6f6e2d
19 changed files with 285 additions and 222 deletions
|
|
@ -7,7 +7,7 @@
|
|||
use crate::date::DateTime;
|
||||
use crate::message::MessagePayload;
|
||||
use crate::presence::PresencePayload;
|
||||
use crate::util::helpers::PlainText;
|
||||
use crate::util::text_node_codecs::{Codec, OptionalCodec, Text};
|
||||
use jid::Jid;
|
||||
|
||||
generate_element!(
|
||||
|
|
@ -22,7 +22,7 @@ generate_element!(
|
|||
],
|
||||
text: (
|
||||
/// The optional reason this message got delayed.
|
||||
data: PlainText<Option<String>>
|
||||
data: OptionalCodec<Text>
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue