re-arrange

This commit is contained in:
oliver 2024-07-29 13:38:51 -06:00
parent c5cb4eb524
commit 9492f378d3

View File

@ -7,15 +7,6 @@ use serde::Serialize;
use tokio::time::Instant; use tokio::time::Instant;
use tracing::{debug, error, info, trace}; 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)] #[derive(Serialize)]
struct Channel { struct Channel {
this: GuildChannel, this: GuildChannel,
@ -36,6 +27,15 @@ impl Channel {
} }
} }
#[derive(Serialize)]
struct Server {
channels: Vec<Channel>,
#[serde(skip_serializing_if = "Vec::is_empty")]
orphanage: Vec<GuildChannel>,
#[serde(skip_serializing)]
needs_clean: bool,
}
impl Display for Server { impl Display for Server {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {