Skip to content

Commit

Permalink
chore: flatten enum
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusc93 committed Dec 20, 2024
1 parent 4ea1dea commit dcdf4b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion extensions/warp-ipfs/src/store/payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pub struct PayloadMessage<M> {
date: DateTime<Utc>,

/// bytes of the message serialized as cbor
#[serde(flatten)]
message: PayloadSelectMessage<M>,

/// recipients of the payload message, if any.
Expand All @@ -44,7 +45,7 @@ pub struct PayloadMessage<M> {
}

#[derive(Debug, Serialize, Deserialize, Clone)]
#[serde(rename_all = "lowercase")]
#[serde(untagged)]
enum PayloadSelectMessage<M> {
Clear { message: M },
Encrypted { bytes: Bytes },
Expand Down

0 comments on commit dcdf4b5

Please sign in to comment.