use existing if_false function
This commit is contained in:
@@ -37,8 +37,8 @@ pub type PermissionTuple = (
|
||||
i32 // channel permission
|
||||
);
|
||||
|
||||
fn if_false(t: &bool) -> bool {
|
||||
*t == false
|
||||
pub fn if_false(t: &bool) -> bool {
|
||||
!t
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||
@@ -108,7 +108,7 @@ pub struct Server {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub banner: Option<File>,
|
||||
|
||||
#[serde(skip_serializing_if = "is_false", default)]
|
||||
#[serde(skip_serializing_if = "if_false", default)]
|
||||
pub nsfw: bool
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user