From 7f1a262999d7a8b7f12a97daf4b6722638dc62a1 Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Thu, 25 May 2023 21:06:40 +0200 Subject: more progress instead of print, more references --- src/db.rs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/db.rs') diff --git a/src/db.rs b/src/db.rs index 3409298..22085a5 100644 --- a/src/db.rs +++ b/src/db.rs @@ -121,7 +121,7 @@ pub fn mods_get_info(config: &Cfg, id: &str) -> MLE { } pub fn mods_remove(config: &Cfg, id: String) -> MLE<()> { - println!("Removing mod {} from database", id); + // println!("Removing mod {} from database", id); let data = format!("{}/data.db", config.data); let connection = Connection::open(data)?; @@ -167,10 +167,10 @@ pub fn mods_get_versions(config: &Cfg, mods: Vec) -> MLE MLE> { let id_iter = stmt.query_map([], |row| row.get::(0))?; for id in id_iter { - //println!("Found id {:?}", id.as_ref().unwrap()); mod_ids.push(id?) } match mod_ids.is_empty() { - true => Err(MLError::new(ErrorType::DBError, "NO_MODS_USERLIST")), + true => Err(MLError::new(ErrorType::DBError, &format!("NO_MODS_USERLIST{}", list_id))), false => Ok(mod_ids), } } @@ -475,7 +474,7 @@ pub fn userlist_get_all_downloads( for link in link_iter { let l = link?; - println!("Found link {}", String::from(&l)); + // println!("Found link {}", String::from(&l)); links.push(l) } @@ -498,7 +497,7 @@ pub fn lists_insert( mod_loader: &Modloader, download_folder: &str, ) -> MLE<()> { - println!("Creating list {}", id); + // println!("Creating list {}", id); let data = format!("{}/data.db", config.data); let connection = Connection::open(data)?; -- cgit v1.2.3