Skip to content
Snippets Groups Projects
Unverified Commit 28c30cc5 authored by Dessalines's avatar Dessalines Committed by GitHub
Browse files

Adding skip_serializing_none to federation state. (#4152)

parent 907e0ce7
No related branches found
No related tags found
No related merge requests found
...@@ -328,6 +328,7 @@ pub struct FederatedInstances { ...@@ -328,6 +328,7 @@ pub struct FederatedInstances {
pub blocked: Vec<InstanceWithFederationState>, pub blocked: Vec<InstanceWithFederationState>,
} }
#[skip_serializing_none]
#[derive(Debug, Serialize, Deserialize, Clone)] #[derive(Debug, Serialize, Deserialize, Clone)]
#[cfg_attr(feature = "full", derive(TS))] #[cfg_attr(feature = "full", derive(TS))]
#[cfg_attr(feature = "full", ts(export))] #[cfg_attr(feature = "full", ts(export))]
...@@ -350,6 +351,7 @@ impl From<FederationQueueState> for ReadableFederationState { ...@@ -350,6 +351,7 @@ impl From<FederationQueueState> for ReadableFederationState {
} }
} }
#[skip_serializing_none]
#[derive(Debug, Serialize, Deserialize, Clone)] #[derive(Debug, Serialize, Deserialize, Clone)]
#[cfg_attr(feature = "full", derive(TS))] #[cfg_attr(feature = "full", derive(TS))]
#[cfg_attr(feature = "full", ts(export))] #[cfg_attr(feature = "full", ts(export))]
......
...@@ -3,9 +3,11 @@ use chrono::{DateTime, Utc}; ...@@ -3,9 +3,11 @@ use chrono::{DateTime, Utc};
#[cfg(feature = "full")] #[cfg(feature = "full")]
use diesel::prelude::*; use diesel::prelude::*;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use serde_with::skip_serializing_none;
#[cfg(feature = "full")] #[cfg(feature = "full")]
use ts_rs::TS; use ts_rs::TS;
#[skip_serializing_none]
#[derive(Clone, Debug, Serialize, Deserialize)] #[derive(Clone, Debug, Serialize, Deserialize)]
#[cfg_attr( #[cfg_attr(
feature = "full", feature = "full",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment