generated from Oliver/discord-bot-template
don't serialize empty vecs
All checks were successful
Test Rust project / test (ubuntu-latest, stable) (push) Successful in 2m47s
All checks were successful
Test Rust project / test (ubuntu-latest, stable) (push) Successful in 2m47s
This commit is contained in:
parent
620b855f1d
commit
c5cb4eb524
@ -10,14 +10,18 @@ use tracing::{debug, error, info, trace};
|
||||
#[derive(Serialize)]
|
||||
struct Server {
|
||||
channels: Vec<Channel>,
|
||||
#[serde(skip_serializing_if = "Vec::is_empty")]
|
||||
orphanage: Vec<GuildChannel>,
|
||||
#[serde(skip_serializing)]
|
||||
needs_clean: bool,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct Channel {
|
||||
this: GuildChannel,
|
||||
#[serde(skip_serializing_if = "Vec::is_empty")]
|
||||
children: Vec<Channel>,
|
||||
#[serde(skip_serializing_if = "Vec::is_empty")]
|
||||
messages: Vec<Message>,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user