From 245b6b9926033acd750503ab4947c9514c5e1aa6 Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Wed, 3 May 2023 08:01:51 +0200 Subject: fuck serde, plus maybe added quilt --- src/apis/modrinth.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/apis') diff --git a/src/apis/modrinth.rs b/src/apis/modrinth.rs index 13e7a6d..525cc0d 100644 --- a/src/apis/modrinth.rs +++ b/src/apis/modrinth.rs @@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize}; use crate::{ error::{ErrorType, MLError, MLE}, - List, Modloader, + List, }; #[derive(Debug, Deserialize, Clone)] @@ -168,14 +168,9 @@ pub async fn projects(api: &str, ids: Vec) -> Vec { ///Get applicable versions from mod_id with list context pub async fn versions(api: &str, id: String, list: List) -> Vec { - let loaderstr = match list.modloader { - Modloader::Forge => String::from("forge"), - Modloader::Fabric => String::from("fabric"), - }; - let url = format!( r#"project/{}/version?loaders=["{}"]&game_versions=["{}"]"#, - id, loaderstr, list.mc_version + id, list.modloader.to_string(), list.mc_version ); let data = get(api, &url).await.unwrap(); -- cgit v1.2.3