chore: format
This commit is contained in:
parent
5206d56cf8
commit
21564c2ae6
|
@ -9,7 +9,7 @@ pub enum Flag {
|
|||
Instance,
|
||||
Incompatible,
|
||||
Launch,
|
||||
Env
|
||||
Env,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Hash)]
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
}
|
|
@ -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)]
|
||||
|
|
Loading…
Reference in a new issue