chore: format
This commit is contained in:
parent
5206d56cf8
commit
21564c2ae6
4 changed files with 16 additions and 15 deletions
|
@ -18,7 +18,7 @@ pub struct APIFile {
|
|||
pub hashes: Option<Hashes>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub meta: Option<Meta>,
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct AddonDescriptor {
|
||||
|
@ -49,4 +49,4 @@ pub struct EnvBuilderRequest {
|
|||
pub struct EnvBuilderResponse {
|
||||
pub addonscript: AddonScript,
|
||||
pub files: Vec<File>,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ pub enum Flag {
|
|||
Instance,
|
||||
Incompatible,
|
||||
Launch,
|
||||
Env
|
||||
Env,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Hash)]
|
||||
|
@ -20,4 +20,4 @@ pub enum InstallAction {
|
|||
Rename,
|
||||
Inject,
|
||||
Unknown(String),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
@ -60,7 +63,7 @@ pub struct Relation {
|
|||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct File {
|
||||
pub struct File {
|
||||
pub qualifier: String,
|
||||
pub link: Vec<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
@ -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,11 +40,11 @@ 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)]
|
||||
pub struct Contributor {
|
||||
pub name: String,
|
||||
pub email: String,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue