Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
remove unused pub
Browse files Browse the repository at this point in the history
  • Loading branch information
TOwInOK committed Apr 29, 2024
1 parent 2af613c commit 1aaee0f
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 47 deletions.
22 changes: 11 additions & 11 deletions src/models/cores/paper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@ pub trait ModelCorePaperFamily {

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct VersionList {
pub versions: Vec<String>,
struct VersionList {
versions: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct BuildList {
pub builds: Vec<u16>,
struct BuildList {
builds: Vec<u16>,
}

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Url {
pub downloads: Downloads,
struct Url {
downloads: Downloads,
}

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Downloads {
pub application: Application,
struct Downloads {
application: Application,
}

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Application {
pub name: String,
pub sha256: String,
struct Application {
name: String,
sha256: String,
}

impl<T: ModelCorePaperFamily> ModelCore for T {
Expand Down
18 changes: 9 additions & 9 deletions src/models/cores/purpur.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@ pub struct Purpur {}

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct VersionList {
pub versions: Vec<String>,
struct VersionList {
versions: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct BuildList {
pub builds: Builds,
struct BuildList {
builds: Builds,
}

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Builds {
pub latest: String,
pub all: Vec<String>,
struct Builds {
latest: String,
all: Vec<String>,
}

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FileHash {
pub md5: String,
struct FileHash {
md5: String,
}

// Download
Expand Down
34 changes: 17 additions & 17 deletions src/models/cores/vanilla.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,30 @@ type VersionID = String;

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Vanilla {
pub latest: Latest,
pub versions: Vec<Version>,
latest: Latest,
versions: Vec<Version>,
}

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Latest {
pub release: String,
pub snapshot: String,
struct Latest {
release: String,
snapshot: String,
}

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Version {
struct Version {
#[serde(rename = "id")]
pub version: String,
version: String,

#[serde(rename = "type")]
pub type_field: TypeOfVersion,
type_field: TypeOfVersion,

pub url: String,
url: String,
}

///Minecraft types of version
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum TypeOfVersion {
enum TypeOfVersion {
#[serde(rename = "release")]
Release,
#[serde(rename = "snapshot")]
Expand All @@ -56,19 +56,19 @@ impl Default for TypeOfVersion {
//Area of download from list of details about version

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DownloadSection {
pub downloads: Downloads,
struct DownloadSection {
downloads: Downloads,
}

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Downloads {
pub server: Server,
struct Downloads {
server: Server,
}

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Server {
pub sha1: String,
pub url: String,
struct Server {
sha1: String,
url: String,
}

impl ModelCore for Vanilla {
Expand Down
20 changes: 10 additions & 10 deletions src/models/extensions/modrinth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,29 @@ use crate::tr::model::extension::ModelExtensions;
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ModrinthData {
//Always change ich version
pub id: String,
id: String,
//Stable token.
pub project_id: String,
pub files: Vec<File>,
pub dependencies: Vec<Dependency>,
project_id: String,
files: Vec<File>,
dependencies: Vec<Dependency>,
}

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
struct File {
pub hashes: Hashes,
pub url: String,
hashes: Hashes,
url: String,
}

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
struct Hashes {
pub sha1: String,
pub sha512: String,
sha1: String,
sha512: String,
}

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
struct Dependency {
pub project_id: String,
pub dependency_type: String,
project_id: String,
dependency_type: String,
}

impl ModelExtensions for ModrinthData {
Expand Down

0 comments on commit 1aaee0f

Please sign in to comment.