use existing if_false function

This commit is contained in:
Zomatree
2021-08-16 00:35:53 +01:00
parent 5179504ad9
commit d972395e43
2 changed files with 5 additions and 5 deletions

View File

@@ -103,7 +103,7 @@ pub enum Channel {
#[serde(default = "HashMap::new", skip_serializing_if = "HashMap::is_empty")]
role_permissions: HashMap<String, i32>,
#[serde(skip_serializing_if = "is_false", default)]
#[serde(skip_serializing_if = "entities::server::if_false", default)]
nsfw: bool
},
}
@@ -406,6 +406,6 @@ impl Channel {
}
fn is_false(value: &bool) -> bool {
pub fn is_false(value: &bool) -> bool {
!value
}