chore: format

This commit is contained in:
Timo Ley 2022-11-28 11:06:15 +01:00
parent 5206d56cf8
commit 21564c2ae6
4 changed files with 16 additions and 15 deletions

View file

@ -9,7 +9,7 @@ pub enum Flag {
Instance,
Incompatible,
Launch,
Env
Env,
}
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Hash)]

View file

@ -2,11 +2,14 @@ use std::collections::HashSet;
use serde::{Deserialize, Serialize};
pub use self::{enums::{Flag, InstallAction}, meta::*};
pub use self::{
enums::{Flag, InstallAction},
meta::*,
};
pub mod api;
pub mod meta;
pub mod enums;
pub mod meta;
#[derive(Debug, Serialize, Deserialize)]
pub struct Manifest {
@ -15,7 +18,7 @@ pub struct Manifest {
pub namespace: String,
pub version: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub files : Option<Vec<File>>,
pub files: Option<Vec<File>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub relations: Option<Vec<Relation>>,
pub flags: Flags,
@ -101,7 +104,6 @@ impl VersionlessManifest {
}
impl Flags {
pub fn has_client_flag(&self, flag: &Flag) -> bool {
if let Some(flags) = &self.client {
if flags.contains(flag) {
@ -113,7 +115,7 @@ impl Flags {
return true;
}
}
return false;
false
}
pub fn has_server_flag(&self, flag: &Flag) -> bool {
@ -127,7 +129,6 @@ impl Flags {
return true;
}
}
return false;
false
}
}

View file

@ -40,7 +40,7 @@ pub struct VersionMeta {
#[serde(skip_serializing_if = "Option::is_none")]
pub changelog: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub timestamp:Option<u32>,
pub timestamp: Option<u32>,
}
#[derive(Debug, Serialize, Deserialize, Clone)]