From ea50af892c4268ae06f6df40ee435eadd076228d Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Sun, 6 Nov 2022 23:06:54 +0100 Subject: halfswitch to rusqlite; db tests --- src/commands/list.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/commands/list.rs') 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 @@ use std::io::{Error, ErrorKind}; -use crate::{db::{insert_list, remove_list, change_list, get_lists, get_current_list_id, get_list}, Modloader, config::Cfg, input::Input}; +use crate::{db::{lists_insert, remove_list, change_list, get_lists, get_current_list_id, get_list}, Modloader, config::Cfg, input::Input}; #[derive(Clone)] pub struct List { @@ -52,8 +52,8 @@ fn add(config: Cfg, args: Vec) -> Result<(), Box> "fabric" => Modloader::Fabric, _ => return Err(Box::new(Error::new(ErrorKind::InvalidInput, "UNKNOWN_MODLOADER"))) }; - match insert_list(config, id, mc_version, mod_loader) { - Err(err) => { Err(Box::new(err)) }, + match lists_insert(config, id, mc_version, mod_loader) { + Err(err) => { Err(Box::new(Error::new(ErrorKind::Other, "TBD"))) }, Ok(()) => Ok(()), } }, @@ -69,7 +69,7 @@ fn change(config: Cfg, args: Vec) -> Result<(), Box { Err(Box::new(err)) }, + Err(err) => { Err(Box::new(Error::new(ErrorKind::Other, "TBD"))) }, Ok(()) => Ok(()), } }, @@ -82,7 +82,7 @@ fn remove(config: Cfg, args: Vec) -> Result<(), Box { match remove_list(config, String::from(&args[0])) { - Err(err) => { Err(Box::new(err)) }, + Err(err) => { Err(Box::new(Error::new(ErrorKind::Other, "TBD"))) }, Ok(()) => Ok(()), } }, -- cgit v1.2.3