diff options
Diffstat (limited to 'src/commands/list.rs')
-rw-r--r-- | src/commands/list.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/commands/list.rs b/src/commands/list.rs index 3dfe1ad..ffa5926 100644 --- a/src/commands/list.rs +++ b/src/commands/list.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | use std::io::{Error, ErrorKind}; | 1 | use std::io::{Error, ErrorKind}; |
2 | 2 | ||
3 | use crate::{db::{insert_list, remove_list, change_list, get_lists, get_current_list_id, get_list}, Modloader, config::Cfg, input::Input}; | 3 | use crate::{db::{lists_insert, remove_list, change_list, get_lists, get_current_list_id, get_list}, Modloader, config::Cfg, input::Input}; |
4 | 4 | ||
5 | #[derive(Clone)] | 5 | #[derive(Clone)] |
6 | pub struct List { | 6 | pub struct List { |
@@ -52,8 +52,8 @@ fn add(config: Cfg, args: Vec<String>) -> Result<(), Box<dyn std::error::Error>> | |||
52 | "fabric" => Modloader::Fabric, | 52 | "fabric" => Modloader::Fabric, |
53 | _ => return Err(Box::new(Error::new(ErrorKind::InvalidInput, "UNKNOWN_MODLOADER"))) | 53 | _ => return Err(Box::new(Error::new(ErrorKind::InvalidInput, "UNKNOWN_MODLOADER"))) |
54 | }; | 54 | }; |
55 | match insert_list(config, id, mc_version, mod_loader) { | 55 | match lists_insert(config, id, mc_version, mod_loader) { |
56 | Err(err) => { Err(Box::new(err)) }, | 56 | Err(err) => { Err(Box::new(Error::new(ErrorKind::Other, "TBD"))) }, |
57 | Ok(()) => Ok(()), | 57 | Ok(()) => Ok(()), |
58 | } | 58 | } |
59 | }, | 59 | }, |
@@ -69,7 +69,7 @@ fn change(config: Cfg, args: Vec<String>) -> Result<(), Box<dyn std::error::Erro | |||
69 | let list = String::from(&args[0]); | 69 | let list = String::from(&args[0]); |
70 | if !lists.contains(&list) { return Err(Box::new(Error::new(ErrorKind::NotFound, "LIST_DOESNT_EXIST"))); }; | 70 | if !lists.contains(&list) { return Err(Box::new(Error::new(ErrorKind::NotFound, "LIST_DOESNT_EXIST"))); }; |
71 | match change_list(config, list) { | 71 | match change_list(config, list) { |
72 | Err(err) => { Err(Box::new(err)) }, | 72 | Err(err) => { Err(Box::new(Error::new(ErrorKind::Other, "TBD"))) }, |
73 | Ok(()) => Ok(()), | 73 | Ok(()) => Ok(()), |
74 | } | 74 | } |
75 | }, | 75 | }, |
@@ -82,7 +82,7 @@ fn remove(config: Cfg, args: Vec<String>) -> Result<(), Box<dyn std::error::Erro | |||
82 | match args.len() { | 82 | match args.len() { |
83 | 1 => { | 83 | 1 => { |
84 | match remove_list(config, String::from(&args[0])) { | 84 | match remove_list(config, String::from(&args[0])) { |
85 | Err(err) => { Err(Box::new(err)) }, | 85 | Err(err) => { Err(Box::new(Error::new(ErrorKind::Other, "TBD"))) }, |
86 | Ok(()) => Ok(()), | 86 | Ok(()) => Ok(()), |
87 | } | 87 | } |
88 | }, | 88 | }, |