From 8050cfcd70a16273cc2814fe29c8ee08320d85d3 Mon Sep 17 00:00:00 2001
From: fxqnlr <felixquinn03@gmail.com>
Date: Thu, 20 Apr 2023 15:13:58 +0200
Subject: cargo fmt

---
 src/commands/list.rs | 38 ++++++++++++++++++++++++++++++++------
 1 file changed, 32 insertions(+), 6 deletions(-)

(limited to 'src/commands/list.rs')

diff --git a/src/commands/list.rs b/src/commands/list.rs
index 80e801a..13176f4 100644
--- a/src/commands/list.rs
+++ b/src/commands/list.rs
@@ -1,4 +1,12 @@
-use crate::{db::{lists_insert, lists_remove, config_change_current_list, config_get_current_list, lists_get, lists_version}, Modloader, config::Cfg, update, error::MLE};
+use crate::{
+    config::Cfg,
+    db::{
+        config_change_current_list, config_get_current_list, lists_get, lists_insert, lists_remove,
+        lists_version,
+    },
+    error::MLE,
+    update, Modloader,
+};
 
 #[derive(Debug, Clone, PartialEq, Eq)]
 pub struct List {
@@ -13,7 +21,13 @@ pub fn get_current_list(config: Cfg) -> MLE<List> {
     lists_get(config, id)
 }
 
-pub fn list_add(config: Cfg, id: String, mc_version: String, modloader: Modloader, directory: String) -> MLE<()> {
+pub fn list_add(
+    config: Cfg,
+    id: String,
+    mc_version: String,
+    modloader: Modloader,
+    directory: String,
+) -> MLE<()> {
     lists_insert(config, id, mc_version, modloader, directory)
 }
 
@@ -30,15 +44,27 @@ pub fn list_remove(config: Cfg, id: String) -> MLE<()> {
 ///Changing the current lists version and updating it
 ///
 /// #Arguments
-/// 
+///
 /// * `config` - The current config
 /// * `args` - All args, to extract the new version
-pub async fn list_version(config: Cfg, id: String, mc_version: String, download: bool, delete: bool) -> MLE<()> {
-    println!("Change version for list {} to minecraft version: {}", id, mc_version);
+pub async fn list_version(
+    config: Cfg,
+    id: String,
+    mc_version: String,
+    download: bool,
+    delete: bool,
+) -> MLE<()> {
+    println!(
+        "Change version for list {} to minecraft version: {}",
+        id, mc_version
+    );
 
     lists_version(config.clone(), &id, &mc_version)?;
 
-    println!("\nCheck for updates for new minecraft version in list {}", id);
+    println!(
+        "\nCheck for updates for new minecraft version in list {}",
+        id
+    );
     let list = lists_get(config.clone(), id)?;
     update(config, vec![list], true, download, delete).await
 }
-- 
cgit v1.2.3